Make building & installing the core components of Evergreen optional.
[Evergreen.git] / Open-ILS / xul / staff_client / Makefile.am
index ea489c3..e50540d 100644 (file)
@@ -4,13 +4,22 @@
 #---------------------------------------------------------
 
 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
+
 OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
 CHROME_LOCALES = $$(ls -1 chrome/locale)
 SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
 
-install-exec-local: build
+#------------------------------
+# Build ILS XUL CLIENT/SERVER
+#------------------------------
+
+if BUILDILSCLIENT
+OILSSERVER_INST = server-xul
+endif
+
+install-exec-local: $(OILSSERVER_INST)
 
-build: build_dir chrome2remote localize_manifest generated custom_skins open-ils stamp
+build: build_dir chrome2remote localize_manifest generated custom_skins open-ils stamp 
        @echo To test the staff client:
        @echo "  cd build/"
        @echo "  xulrunner application.ini"
@@ -26,7 +35,6 @@ build_dir:
        @cp -fR build/chrome/content/util/ build/server/
        @cp -fR build/chrome/content/auth/ build/server/
        @cp build/chrome/content/main/constants.js build/server/main/constants.js
-       @cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
        @cp build/chrome/content/main/bindings.xml build/server/main/bindings.xml
        @cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
        @cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
@@ -34,7 +42,6 @@ build_dir:
 
 # Convert chrome to remote for server localization
 chrome2remote:
-       @sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/main/simple_auth.xul
        @for loc in $(CHROME_LOCALES); do \
                cp -fr chrome/locale/$$loc build/server/locale/. ; \
        done;
@@ -58,6 +65,11 @@ stamp:
        @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.js' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
        @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
 
+bundle:
+       @rm -f build/build.tar
+       @tar cf build.tar build/
+       @mv build.tar build/
+
 generated:
        @echo ' * Grabbing lang.dtd from the OPAC code '
        @cp @top_srcdir@/Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
@@ -72,3 +84,12 @@ custom_skins:
        @for skin in $(SKIN_CSS); do \
                if [ ! -f "$$skin" ]; then ( touch build/"$$skin" ); fi \
        done;
+
+server-xul: build
+       @echo $@
+       mkdir -p $(WEBDIR)
+       mkdir -p $(WEBDIR)/xul/
+       @echo "BUILD_ID = $(STAFF_CLIENT_BUILD_ID)"
+       @echo "Copying xul into $(WEBDIR)/xul/$(STAFF_CLIENT_BUILD_ID)"
+       mkdir -p "$(WEBDIR)/xul/$(STAFF_CLIENT_BUILD_ID)"
+       cp -R @top_srcdir@/Open-ILS/xul/staff_client/build/server "${WEBDIR}/xul/${STAFF_CLIENT_BUILD_ID}/"