1 # ILS/Open-ILS/xul/staff_client/Makefile
3 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
9 build: remove_symlinks build_dir generated open-ils custom stamp add_symlinks
12 @echo To test the staff client:
14 @echo " xulrunner application.ini"
18 @echo Removing convenience symlinks from server/ and chrome/ before copying to build/
19 find server/ -type l -exec rm -f {} \;
20 find chrome/ -type l -exec rm -f {} \;
24 @echo Adding convenience symlinks back into server/ and chrome/
25 ln -s ../chrome/content/util server/util
26 ln -s ../chrome/content/auth server/auth
27 ln -s ../../chrome/content/main/constants.js server/main/constants.js
28 ln -s ../../chrome/content/main/lang.js server/main/lang.js
29 ln -s ../../chrome/content/main/simple_auth.xul server/main/simple_auth.xul
30 ln -s ../../chrome/content/OpenILS/data.js server/OpenILS/data.js
31 (cd build/chrome/content/OpenSRF/; for x in *; do ln -s ../../../build/chrome/content/OpenSRF/$$x ../../../../chrome/content/OpenSRF/$$x; done)
32 (cd build/chrome/content/OpenILS/util/; for x in *; do if [ $$x != 'fmall.js' ]; then ln -s ../../../../build/chrome/content/OpenILS/util/$$x ../../../../../chrome/content/OpenILS/util/$$x; fi ; done)
33 (cd build/chrome/content/legacy/; for x in [a-z]*; do ln -s ../../../build/chrome/content/legacy/$$x ../../../../chrome/content/legacy/$$x; done)
34 (cd build/chrome/locale/en-US/; for x in *; do ln -s ../../../build/chrome/locale/en-US/$$x ../../../../chrome/locale/en-US/$$x; done)
38 @echo '********************************************************* Creating and populating build/ '
43 cp -R components build/
44 cp application.ini build/
45 cp -R build/chrome/content/util/ build/server/
46 cp -R build/chrome/content/auth/ build/server/
47 cp build/chrome/content/main/constants.js build/server/main/constants.js
48 cp build/chrome/content/main/lang.js build/server/main/lang.js
49 cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
50 cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
51 cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
52 external/prune_dirs.sh build/
56 @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
57 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ; echo ${STAFF_CLIENT_BUILD_ID} > build/BUILD_ID ) ; fi
58 @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
59 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
60 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
61 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xul' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
62 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.html' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
63 @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
67 @echo '********************************************************* Grabbing lang.dtd from the OPAC code '
68 cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
69 external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
73 @echo '********************************************************* Grabbing more OPAC code and legacy code and custom code'
74 cp ../../../OpenSRF/src/javascript/*.js build/chrome/content/OpenSRF/
75 cp ../../../Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
76 cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* build/chrome/content/legacy/
77 cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* build/chrome/content/legacy/
78 cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd build/chrome/locale/en-US/
79 cp -R ../../../Evergreen/xul/staff_client/server/ build/
80 external/prune_dirs.sh build/
81 find build/chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
86 @echo '********************************************************* Placeholder for debugging tweaks '
87 #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
89 clean: remove_symlinks
91 @echo '********************************************************* Removing build/ '