From 31e59cab35c64271285a9116de2e1740b529f114 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 18 Dec 2007 20:57:52 +0000 Subject: [PATCH] add make samples target, make samples by default if there are not already dirs out there, don't update configs on each make install git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6877 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- Makefile.am | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4344d11dc2..3af8ee06f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -163,11 +163,8 @@ $(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool modul $(switch_builddir)/quiet_libtool: $(switch_builddir)/libtool @cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > quiet_libtool -install-data-local: - @echo Installing $(NAME) - @for x in conf conf/dialplan conf/directory conf/sip_profiles mod db log log/xml_cdr bin scripts htdocs grammar ; do \ - $(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \ - done +samples-conf: + test -d $(DESTDIR)$(prefix)/conf || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf for conffile in `find conf -name \*.xml && find conf -name \*.conf && find conf -name \*.tpl && find conf -name mime.types` ; do \ dir=`echo $$conffile | sed -e 's|/[^/]*$$||'`; \ filename=`echo $$conffile | sed -e 's|^.*/||'`; \ @@ -175,13 +172,26 @@ install-data-local: test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename || \ test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename.noload || \ $(INSTALL) $$dir/$$filename $(DESTDIR)$(PREFIX)/$$dir; \ - done ; + done + +samples-htdocs: + test -d $(DESTDIR)$(prefix)/htdocs || $(mkinstalldirs) $(DESTDIR)$(prefix)/htdocs for htdocsfile in `find htdocs -name \* | grep -v .svn` ; do \ dir=`echo $$htdocsfile | sed -e 's|/[^/]*$$||'`; \ filename=`echo $$htdocsfile | sed -e 's|^.*/||'`; \ test -d $(DESTDIR)$(PREFIX)/$$dir || $(mkinstalldirs) $(DESTDIR)$(prefix)/$$dir ; \ test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename || $(INSTALL) $$dir/$$filename $(DESTDIR)$(PREFIX)/$$dir; \ - done ; + done + +samples: samples-conf samples-htdocs + +install-data-local: + @echo Installing $(NAME) + @for x in mod db log log/xml_cdr bin scripts grammar ; do \ + $(mkinstalldirs) $(DESTDIR)$(prefix)/$$x ; \ + done + test -d $(DESTDIR)$(prefix)/conf || $(MAKE) samples-conf + test -d $(DESTDIR)$(prefix)/htdocs || $(MAKE) samples-htdocs .version: touch .version