Evergreen XUL no longer exists
[Evergreen.git] / Open-ILS / xul / staff_client / Makefile.am
1 #---------------------------------------------------------
2 # Makefile.am for xul/staff_client
3 ## Process this file with automake to generate Makefile.in
4 #---------------------------------------------------------
5
6 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
7 OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
8
9 install-exec-local: build
10
11 build: build_dir generated open-ils stamp
12         @echo To test the staff client:
13         @echo "  cd build/"
14         @echo "  xulrunner application.ini"
15
16 build_dir:
17         @echo ' * Creating and populating build/ '
18         mkdir -p build/
19         cp -R chrome build/
20         cp -R server build/
21         cp -R defaults build/
22         cp -R components build/
23         cp application.ini build/
24         cp -R build/chrome/content/util/ build/server/
25         cp -R build/chrome/content/auth/ build/server/
26         cp build/chrome/content/main/constants.js build/server/main/constants.js
27         cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
28         cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
29         cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
30         external/prune_dirs.sh build/
31
32 stamp:
33         @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
34         @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
35         @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
36         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
37         @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
38         @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
39         @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
40         @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
41         @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
42         @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
43
44 generated:
45         @echo ' * Grabbing lang.dtd from the OPAC code '
46         cp @top_srcdir@/Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
47
48 open-ils:
49         @echo ' * Grabbing more OPAC code and legacy code and custom code'
50         cp @top_srcdir@/Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
51         cp $(OPENSRF_JSLIBS)/*.js build/chrome/content/OpenILS/util/
52         external/prune_dirs.sh build/
53
54