[open-ils-commits] r15446 - in trunk: . Open-ILS/src Open-ILS/src/java Open-ILS/web (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Feb 4 00:00:57 EST 2010
Author: dbs
Date: 2010-02-04 00:00:54 -0500 (Thu, 04 Feb 2010)
New Revision: 15446
Modified:
trunk/Open-ILS/src/Makefile.am
trunk/Open-ILS/src/java/Makefile.am
trunk/Open-ILS/web/Makefile.am
trunk/configure.ac
Log:
Make Evergreen link to the OpenSRF JavaScript files, rather than copy them.
This means that if you upgrade OpenSRF, you will automatically get the
upgraded OpenSRF JavaScript in your Evergreen instance without having to
manually copy the files into the multiple places they live. Your Dojo
layer will still need to be recreated, however.
Also, use the autoconf AC_PROG_LN_S and AC_PROG_MKDIR_P macros to provide
better cross-platform support for these commands.
Modified: trunk/Open-ILS/src/Makefile.am
===================================================================
--- trunk/Open-ILS/src/Makefile.am 2010-02-04 04:44:50 UTC (rev 15445)
+++ trunk/Open-ILS/src/Makefile.am 2010-02-04 05:00:54 UTC (rev 15446)
@@ -164,15 +164,15 @@
ilscore-install:
@echo $@
@echo "Installing Perl modules"
- mkdir -p $(perldir)
- mkdir -p $(TEMPLATEDIR)
+ $(MKDIR_P) $(perldir)
+ $(MKDIR_P) $(TEMPLATEDIR)
cp -r @srcdir@/perlmods/* $(perldir)
cp -r @srcdir@/templates/marc $(TEMPLATEDIR)
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@libdir@/perl5/OpenILS/WWW/Web.pm'
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@libdir@/perl5/OpenILS/WWW/Method.pm'
@echo "Installing string templates to $(TEMPLATEDIR)"
- mkdir -p $(TEMPLATEDIR)
- mkdir -p $(datadir)/overdue/
+ $(MKDIR_P) $(TEMPLATEDIR)
+ $(MKDIR_P) $(datadir)/overdue/
cp -r @srcdir@/templates/strings $(TEMPLATEDIR)
sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
Modified: trunk/Open-ILS/src/java/Makefile.am
===================================================================
--- trunk/Open-ILS/src/java/Makefile.am 2010-02-04 04:44:50 UTC (rev 15445)
+++ trunk/Open-ILS/src/java/Makefile.am 2010-02-04 05:00:54 UTC (rev 15446)
@@ -14,7 +14,7 @@
all-local: jar
jar:
- mkdir -p $(JAVA_LIBDIR)
+ $(MKDIR_P) $(JAVA_LIBDIR)
$(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1
rm -f openils.jar
echo "creating openils.jar"
@@ -23,12 +23,12 @@
# only prints the first 30 lines of errors
slim:
- mkdir -p $(JAVA_LIBDIR)
+ $(MKDIR_P) $(JAVA_LIBDIR)
$(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
@echo -e "\nTruncating at 30 lines"
check:
- mkdir -p $(JAVA_LIBDIR)
+ $(MKDIR_P) $(JAVA_LIBDIR)
$(JAVAC) -Xlint:unchecked -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
@echo -e "\nTruncating at 30 lines"
@@ -36,7 +36,7 @@
@$(JAVA) -cp $(JAVA_LIBS):openils.jar $(JAVA_EXE) $(JAVA_ARGS)
deps:
- mkdir -p ext
+ $(MKDIR_P) ext
docs:
find . -name *.java > files;
Modified: trunk/Open-ILS/web/Makefile.am
===================================================================
--- trunk/Open-ILS/web/Makefile.am 2010-02-04 04:44:50 UTC (rev 15445)
+++ trunk/Open-ILS/web/Makefile.am 2010-02-04 05:00:54 UTC (rev 15446)
@@ -16,20 +16,20 @@
#webcore-install
reports_SCRIPTS = @top_srcdir@/Open-ILS/xul/staff_client/server/admin/adminlib.js
-opacjs_SCRIPTS = $(OPENSRF_LIBS)/javascript/DojoSRF.js \
- $(OPENSRF_LIBS)/javascript/JSON_v0.js \
- $(OPENSRF_LIBS)/javascript/JSON_v1.js \
- $(OPENSRF_LIBS)/javascript/md5.js \
- $(OPENSRF_LIBS)/javascript/opensrf.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js \
- @top_srcdir@/Open-ILS/xul/staff_client/chrome//content//util/date.js
-jsdojo_SCRIPTS = $(OPENSRF_LIBS)/javascript/DojoSRF.js
-jsdojoosrf_SCRIPTS = $(OPENSRF_LIBS)/javascript/md5.js \
- $(OPENSRF_LIBS)/javascript/JSON_v1.js \
- $(OPENSRF_LIBS)/javascript/opensrf.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
+OPACJS = $(OPENSRF_LIBS)/javascript/DojoSRF.js \
+ $(OPENSRF_LIBS)/javascript/JSON_v0.js \
+ $(OPENSRF_LIBS)/javascript/JSON_v1.js \
+ $(OPENSRF_LIBS)/javascript/md5.js \
+ $(OPENSRF_LIBS)/javascript/opensrf.js \
+ $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
+ $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js \
+ @top_srcdir@/Open-ILS/xul/staff_client/chrome//content//util/date.js
+JSDOJO = $(OPENSRF_LIBS)/javascript/DojoSRF.js
+JSDOJOOSRF = $(OPENSRF_LIBS)/javascript/md5.js \
+ $(OPENSRF_LIBS)/javascript/JSON_v1.js \
+ $(OPENSRF_LIBS)/javascript/opensrf.js \
+ $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
+ $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
endif
install-exec-local: webcore-install offline-install cgi-bootstrap
@@ -39,47 +39,54 @@
rm -R $(webdir)
webcore-install:
- mkdir -p $(WEBDIR)
- mkdir -p $(WEBDIR)/opac/extras/slimpac/
- mkdir -p $(WEBDIR)/standalone/
- mkdir -p $(opacextrasdir)
- mkdir -p $(DESTDIR)$(reportsdir)
- mkdir -p $(XSLDIR)
+ $(MKDIR_P) $(DESTDIR)$(WEBDIR)
+ $(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/extras/slimpac/
+ $(MKDIR_P) $(DESTDIR)$(WEBDIR)/standalone/
+ $(MKDIR_P) $(opacextrasdir)
+ $(MKDIR_P) $(DESTDIR)$(reportsdir)
+ $(MKDIR_P) $(DESTDIR)$(XSLDIR)
rm -f $(DESTDIR)$(reportsdir)/fm_IDL.xml
cp $(DESTDIR)@sysconfdir@/fm_IDL.xml $(DESTDIR)$(WEBDIR)/reports/
cp -r @top_srcdir@/Open-ILS/web/. $(DESTDIR)$(WEBDIR)
cp @top_srcdir@/Open-ILS/xsl/*.xsl $(opacextrasdir)
- cp @top_srcdir@/Open-ILS/xsl/*.xsl $(XSLDIR)
+ cp @top_srcdir@/Open-ILS/xsl/*.xsl $(DESTDIR)$(XSLDIR)
cp -r $(DESTDIR)$(WEBDIR)/opac/skin/default/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
cp -r @top_srcdir@/Open-ILS/web/opac/skin/craftsman/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/mresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/rresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/rdetail.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/advanced.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/myopac.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/cnbrowse.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/mresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/rresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/rdetail.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/advanced.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/myopac.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/cnbrowse.xml
+ for i in mresult.xml rresult.xml rdetail.xml advanced.xml myopac.xml cnbrowse.xml; do \
+ cd $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/ && rm -f $$i && $(LN_S) index.xml $$i; \
+ done
+ for i in mresult.xml rresult.xml rdetail.xml advanced.xml myopac.xml cnbrowse.xml; do \
+ cd $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/ && rm -f $$i && $(LN_S) index.xml $$i; \
+ done
offline-install:
@echo "Installing offline CGIs to $(CGIDIR)/offline";
- mkdir -p $(TMP)
- mkdir -p $(CGIDIR)/offline;
- mkdir -p $(datadir)/offline;
+ $(MKDIR_P) $(TMP)
+ $(MKDIR_P) $(DESTDIR)$(CGIDIR)/offline;
+ $(MKDIR_P) $(datadir)/offline;
perl -pe "s{##CONFIG##}{@sysconfdir@}" < @top_srcdir@/Open-ILS/src/offline/offline.pl > $(TMP)/offline.pl;
cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
cgi-bootstrap:
- @echo "Installing cgi's to $(CGIDIR)"
- mkdir -p $(TMP)/cgi-bin
- mkdir -p $(CGIDIR)
+ @echo "Installing cgi's to $(DESTDIR)$(CGIDIR)"
+ $(MKDIR_P) $(TMP)/cgi-bin
+ $(MKDIR_P) $(DESTDIR)$(CGIDIR)
for i in @top_srcdir@/Open-ILS/src/cgi-bin/*cgi; do xxx=`basename $$i`; perl -pe "s{##CONFIG##}{@sysconfdir@}" < $$i > $(TMP)/cgi-bin/$$xxx; done
- cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
- cp -r @top_srcdir@/Open-ILS/src/cgi-bin/support $(CGIDIR)
+ cp $(TMP)/cgi-bin/*cgi $(DESTDIR)$(CGIDIR)
+ cp -r @top_srcdir@/Open-ILS/src/cgi-bin/support $(DESTDIR)$(CGIDIR)
chmod 755 $(DESTDIR)$(CGIDIR)/*cgi
+install-data-local:
+ for i in $(OPACJS); do \
+ cd $(DESTDIR)$(WEBDIR)/opac/common/js && \
+ rm -f `basename $$i` && $(LN_S) $$i . ; \
+ done
+ for i in $(JSDOJOSRF); do \
+ cd $(DESTDIR)$(WEBDIR)/js/dojo/opensrf && \
+ rm -f `basename $$i` && $(LN_S) $$i . ; \
+ done
+ for i in $(JSDOJOSRF); do \
+ cd $(DESTDIR)$(WEBDIR)/js/dojo && \
+ rm -f `basename $$i` && $(LN_S) $$i . ; \
+ done
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-02-04 04:44:50 UTC (rev 15445)
+++ trunk/configure.ac 2010-02-04 05:00:54 UTC (rev 15446)
@@ -36,6 +36,7 @@
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+AC_PROG_MKDIR_P
#-----------------------------------
# Install options
More information about the open-ils-commits
mailing list