add configure vars for htdocs and grammar dirs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16239 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2010-01-11 15:47:36 +00:00
parent 5ccac21dc3
commit 89ae5f4741
4 changed files with 24 additions and 16 deletions

View File

@ -305,24 +305,23 @@ samples-conf:
done
samples-htdocs:
test -d $(DESTDIR)$(prefix)/htdocs || $(mkinstalldirs) $(DESTDIR)$(prefix)/htdocs
test -d $(DESTDIR)@htdocsdir@/ || $(mkinstalldirs) $(DESTDIR)@htdocsdir@
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) -m 644 $$dir/$$filename $(DESTDIR)$(PREFIX)/$$dir 2>/dev/null; \
test -d $(DESTDIR)@htdocsdir@/$$dir || $(mkinstalldirs) $(DESTDIR)@htdocsdir@/$$dir ; \
test -f $(DESTDIR)@htdocsdir@/$$dir/$$filename || $(INSTALL) -m 644 $$dir/$$filename $(DESTDIR)@htdocsdir@/$$dir 2>/dev/null; \
done
samples: samples-conf samples-htdocs
install-data-local:
@echo Installing $(NAME)
@for x in @modulesdir@ @runtimedir@ @dbdir@ @logfiledir@ @logfiledir@/xml_cdr @bindir@ @scriptdir@ @recordingsdir@ ; do \
@for x in @modulesdir@ @runtimedir@ @dbdir@ @logfiledir@ @logfiledir@/xml_cdr @bindir@ @scriptdir@ @recordingsdir@ @grammardir@; do \
$(mkinstalldirs) $(DESTDIR)$$x ; \
done
$(mkinstalldirs) $(DESTDIR)$(prefix)/grammar
test -d $(DESTDIR)@confdir@ || $(MAKE) samples-conf
test -d $(DESTDIR)$(prefix)/htdocs || $(MAKE) samples-htdocs
test -d $(DESTDIR)@htdocsdir@ || $(MAKE) samples-htdocs
src/include/switch_version.h: $(switch_builddir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
@have_version=1 ; \

View File

@ -17,6 +17,7 @@ runtimedir=@runtimedir@
logfiledir=@logfiledir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
garmmardir=@grammardir@
CC=@CC@
CXX=@CXX@

View File

@ -52,6 +52,14 @@ dbdir="${prefix}/db"
AC_SUBST(dbdir)
AC_DEFINE_UNQUOTED([SWITCH_DB_DIR],"${dbdir}",[where to put db files])
htdocsdir="${prefix}/htdocs"
AC_SUBST(htdocsdir)
AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files])
grammardir="${prefix}/grammar"
AC_SUBST(grammardir)
AC_DEFINE_UNQUOTED([SWITCH_GRAMMAR_DIR],"${grammardir}",[where to put grammar files])
scriptdir="${prefix}/scripts"
AC_SUBST(scriptdir)
AC_DEFINE_UNQUOTED([SWITCH_SCRIPT_DIR],"${scriptdir}",[where to put script files])

View File

@ -43,19 +43,19 @@ $(POCKETSPHINX_LA): $(POCKETSPHINX_BUILDDIR)/Makefile
cd $(POCKETSPHINX_BUILDDIR) && $(MAKE)
$(TOUCH_TARGET)
$(DESTDIR)$(PREFIX)/grammar/model:
mkdir -p $(DESTDIR)$(PREFIX)/grammar/model
$(DESTDIR)$(grammardir)/model:
mkdir -p $(DESTDIR)$(grammardir)/model
$(DESTDIR)$(PREFIX)/grammar/model/communicator:
$(DESTDIR)$(grammardir)/model/communicator:
$(GETLIB) $(SPHINXMODEL).tar.gz
mkdir -p $(DESTDIR)$(PREFIX)/grammar/model/communicator
cp -rp $(switch_srcdir)/libs/Communicator_semi_40.cd_semi_6000/* $(DESTDIR)$(PREFIX)/grammar/model/communicator
mkdir -p $(DESTDIR)$(grammardir)/model/communicator
cp -rp $(switch_srcdir)/libs/Communicator_semi_40.cd_semi_6000/* $(DESTDIR)$(grammardir)/model/communicator
$(DESTDIR)$(PREFIX)/grammar/model/wsj1:
mkdir -p $(DESTDIR)$(PREFIX)/grammar/model/wsj1
cp -rp $(POCKETSPHINX_DIR)/model/hmm/wsj1/* $(DESTDIR)$(PREFIX)/grammar/model/wsj1
$(DESTDIR)$(grammardir)/model/wsj1:
mkdir -p $(DESTDIR)$(grammardir)/model/wsj1
cp -rp $(POCKETSPHINX_DIR)/model/hmm/wsj1/* $(DESTDIR)$(grammardir)/model/wsj1
dictionary:
@cp -f $(POCKETSPHINX_DIR)/model/lm/cmudict.0.6d $(DESTDIR)$(PREFIX)/grammar/default.dic
@cp -f $(POCKETSPHINX_DIR)/model/lm/cmudict.0.6d $(DESTDIR)$(grammardir)/default.dic
local_install: $(DESTDIR)$(PREFIX)/grammar/model $(DESTDIR)$(PREFIX)/grammar/model/communicator $(DESTDIR)$(PREFIX)/grammar/model/wsj1 dictionary
local_install: $(DESTDIR)$(grammardir)/model $(DESTDIR)$(grammardir)/model/communicator $(DESTDIR)$(grammardir)/model/wsj1 dictionary