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
This commit is contained in:
Michael Jerris 2007-12-18 20:57:52 +00:00
parent fba8cab920
commit 31e59cab35
1 changed files with 17 additions and 7 deletions

View File

@ -163,11 +163,8 @@ $(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool modul
$(switch_builddir)/quiet_libtool: $(switch_builddir)/libtool $(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 @cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > quiet_libtool
install-data-local: samples-conf:
@echo Installing $(NAME) test -d $(DESTDIR)$(prefix)/conf || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf
@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
for conffile in `find conf -name \*.xml && find conf -name \*.conf && find conf -name \*.tpl && find conf -name mime.types` ; do \ 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|/[^/]*$$||'`; \ dir=`echo $$conffile | sed -e 's|/[^/]*$$||'`; \
filename=`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 || \
test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename.noload || \ test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename.noload || \
$(INSTALL) $$dir/$$filename $(DESTDIR)$(PREFIX)/$$dir; \ $(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 \ for htdocsfile in `find htdocs -name \* | grep -v .svn` ; do \
dir=`echo $$htdocsfile | sed -e 's|/[^/]*$$||'`; \ dir=`echo $$htdocsfile | sed -e 's|/[^/]*$$||'`; \
filename=`echo $$htdocsfile | sed -e 's|^.*/||'`; \ filename=`echo $$htdocsfile | sed -e 's|^.*/||'`; \
test -d $(DESTDIR)$(PREFIX)/$$dir || $(mkinstalldirs) $(DESTDIR)$(prefix)/$$dir ; \ test -d $(DESTDIR)$(PREFIX)/$$dir || $(mkinstalldirs) $(DESTDIR)$(prefix)/$$dir ; \
test -f $(DESTDIR)$(PREFIX)/$$dir/$$filename || $(INSTALL) $$dir/$$filename $(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: .version:
touch .version touch .version