]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/Makefile
client side versioning
[Evergreen.git] / Open-ILS / xul / staff_client / Makefile
1 # ILS/Open-ILS/xul/staff_client/Makefile
2
3 all: build 
4         @echo
5         @echo
6
7 build: build_dir generated open-ils custom stamp
8         @echo
9         @echo 
10         @echo To test the staff client:
11         @echo \tcd build/
12         @echo \txulrunner application.ini
13
14 build_dir:
15         @echo
16         @echo '*********************************************************  Creating and populating build/ '
17         mkdir -p build/
18         cp -R chrome build/
19         cp application.ini build/
20         external/prune_dirs.sh build/
21
22 stamp: 
23         @echo
24         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ) ; fi
25         @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ) ; fi
26         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
27         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
28         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xul' -or -name '*.js' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
29
30 generated:
31         @echo
32         @echo '********************************************************* Grabbing lang.dtd from the OPAC code '
33         cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
34         external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
35
36 open-ils:
37         @echo
38         @echo '********************************************************* Grabbing more OPAC code and legacy code '
39         cp ../../../OpenSRF/src/javascript/*.js build/chrome/content/OpenSRF/
40         cp ../../../Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
41         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* build/chrome/content/legacy/
42         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* build/chrome/content/legacy/
43         cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd build/chrome/locale/en-US/
44         find build/chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
45
46 custom:
47         @echo
48         @echo
49         @echo '********************************************************* Placeholder for debugging tweaks '
50         #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
51
52 clean:
53         @echo
54         @echo '********************************************************* Removing build/ '
55         rm -rf build/