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