diff --git a/Makefile.am b/Makefile.am index 7004a18085..9a3b442f64 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 ; \ diff --git a/build/modmake.rules.in b/build/modmake.rules.in index c4b6dc82e0..3aaa4d95f6 100644 --- a/build/modmake.rules.in +++ b/build/modmake.rules.in @@ -17,6 +17,7 @@ runtimedir=@runtimedir@ logfiledir=@logfiledir@ sysconfdir=@sysconfdir@ localstatedir=@localstatedir@ +garmmardir=@grammardir@ CC=@CC@ CXX=@CXX@ diff --git a/configure.in b/configure.in index b4e60ff356..5db3b82b90 100644 --- a/configure.in +++ b/configure.in @@ -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]) diff --git a/src/mod/asr_tts/mod_pocketsphinx/Makefile b/src/mod/asr_tts/mod_pocketsphinx/Makefile index c66469eb2c..28564003bf 100644 --- a/src/mod/asr_tts/mod_pocketsphinx/Makefile +++ b/src/mod/asr_tts/mod_pocketsphinx/Makefile @@ -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