]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/Makefile
until I learn the right way to use Makefile's
[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
5 all: build 
6         @echo
7         @echo
8
9 build: build_dir 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 build_dir:
17         @echo
18         @echo '*********************************************************  Creating and populating build/ '
19         mkdir -p build/
20         /bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
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 build/chrome/content/main/constants.js build/server/main/constants.js
28         cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
29         external/prune_dirs.sh build/
30
31 stamp: 
32         @echo
33         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ) ; fi
34         @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ) ; fi
35         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
36         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
37         @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
38         @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
39
40 generated:
41         @echo
42         @echo '********************************************************* Grabbing lang.dtd from the OPAC code '
43         cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
44         external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
45
46 open-ils:
47         @echo
48         @echo '********************************************************* Grabbing more OPAC code and legacy code '
49         cp ../../../OpenSRF/src/javascript/*.js build/chrome/content/OpenSRF/
50         cp ../../../Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
51         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* build/chrome/content/legacy/
52         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* build/chrome/content/legacy/
53         cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd build/chrome/locale/en-US/
54         find build/chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
55
56 custom:
57         @echo
58         @echo
59         @echo '********************************************************* Placeholder for debugging tweaks '
60         #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
61
62 clean:
63         @echo
64         @echo '********************************************************* Removing build/ '
65         rm -rf build/