]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/Makefile
This commit breaks compatibility with OpenSRF 0.9.
[Evergreen.git] / Open-ILS / xul / staff_client / Makefile
1 # ILS/Open-ILS/xul/staff_client/Makefile
2
3 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
4 export OPENSRF_JSLIBS = $(OPENSRF_LIBS)/javascript
5
6 all: build 
7         @echo
8         @echo
9
10 build: build_dir generated open-ils custom stamp 
11         @echo
12         @echo 
13         @echo To test the staff client:
14         @echo "  cd build/"
15         @echo "  xulrunner application.ini"
16
17 build_dir:
18         @echo
19         @echo '*********************************************************  Creating and populating build/ '
20         mkdir -p build/
21         cp -R chrome build/
22         cp -R server build/
23         cp -R defaults build/
24         cp -R components build/
25         cp application.ini build/
26         cp -R build/chrome/content/util/ build/server/
27         cp -R build/chrome/content/auth/ build/server/
28         cp build/chrome/content/main/constants.js build/server/main/constants.js
29         cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
30         cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
31         cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
32         @echo 
33         # Is the following portable?
34         for i in `cd ../../../Evergreen/xul/staff_client/server/ && find -type f |grep -v \.svn|cut -f2- -d/`; do cp ../../../Evergreen/xul/staff_client/server/$$i build/server/$$i; done
35         external/prune_dirs.sh build/
36
37 stamp: 
38         @echo
39         @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
40         @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
41         @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
42         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
43         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
44         @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
45         @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
46         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xhtml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
47         @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
48         @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
49
50 generated:
51         @echo
52         @echo '********************************************************* Grabbing lang.dtd from the OPAC code '
53         cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
54         # Generate the lang.js file for the stamped build
55         external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
56         cp build/chrome/content/main/lang.js build/server/main/lang.js
57
58 open-ils:
59         @echo
60         @echo '********************************************************* Grabbing more OPAC code and legacy code and custom code'
61         #cp ../../../OpenSRF/src/javascript/*.js build/chrome/content/OpenSRF/
62         cp ../../../Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
63         cp $(OPENSRF_JSLIBS)/*.js build/chrome/content/OpenILS/util/
64         #cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* build/chrome/content/legacy/
65         #cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* build/chrome/content/legacy/
66         #cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd build/chrome/locale/en-US/
67         #cp -R ../../../Evergreen/xul/staff_client/server/ build/
68         external/prune_dirs.sh build/
69         #find build/chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
70
71 custom:
72         @echo
73         @echo
74         @echo '********************************************************* Placeholder for debugging tweaks '
75         #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
76
77 clean: 
78         @echo
79         @echo '********************************************************* Removing build/ '
80         rm -rf build/