allow circ.reshelving_complete.interval ou setting to override the default reshelving...
[Evergreen.git] / Open-ILS / src / Makefile
1 # vim:noet:ts=4
2
3 export LDFLAGS                  += -L . -L$(TMP) -L $(OPENSRF_LIBS)
4 export CFLAGS                   += -pipe -g -Wall -O2 -fPIC -I../../include -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) \
5                                 -D_LARGEFILE64_SOURCE -I$(LIBXML2_HEADERS)/libxml  -I$(TMP) -I$(OPENSRF_HEADERS)
6
7 export INCDIR = "$(INCLUDEDIR)/openils/"
8
9 export STAFF_CLIENT_BUILD_ID = `/bin/cat ../xul/staff_client/build/BUILD_ID`
10
11 all:  c_apps client-xul mod_xmlent python-build
12
13 install:        perl-install python-install web-install server-xul string-templates-install xsl-install c_apps-install circ_rules-install offline-install storage-bootstrap cgi-bootstrap
14
15 web-install:    webcore-install autojs-install mod_xmlent-install offline-install reporter-install
16
17 circ_rules-install:
18         @echo $@
19         mkdir -p $(CIRCRULESDIR)
20         mkdir -p $(PENALTYRULESDIR)
21         mkdir -p $(CATALOGSCRIPTDIR)
22         cp javascript/backend/circ/*.js $(CIRCRULESDIR)
23         cp javascript/backend/penalty/*.js $(PENALTYRULESDIR)
24         cp javascript/backend/catalog/*.js $(CATALOGSCRIPTDIR)
25         cp support-scripts/fine_generator.pl $(BINDIR) 
26         cp support-scripts/hold_targeter.pl $(BINDIR) 
27         cp support-scripts/reshelving_complete.srfsh $(BINDIR) 
28         cp support-scripts/thaw_expired_frozen_holds.srfsh $(BINDIR) 
29         cp support-scripts/long-overdue-status-update.pl $(BINDIR) 
30
31
32 # -----------------------------------------------------------------------------------
33 # Web stuff
34 # -----------------------------------------------------------------------------------
35 mod_xmlent:
36         @echo $@
37         make -C apachemods mod_xmlent.so
38
39 mod_xmlent-install:
40         @echo $@
41         make -C apachemods mod_xmlent-install
42
43 client-xul:
44         @echo $@
45         @echo "Building staff client"
46         make -C ../xul/staff_client 
47
48 server-xul:
49         @echo $@
50         mkdir -p ${WEBDIR}
51         @echo "Creating ${WEBDIR}/xul/"
52         mkdir -p ${WEBDIR}/xul/
53         @echo "BUILD_ID = ${STAFF_CLIENT_BUILD_ID}"
54         @echo "Copying xul into ${WEBDIR}/xul/${STAFF_CLIENT_BUILD_ID}"
55         mkdir -p "${WEBDIR}/xul/${STAFF_CLIENT_BUILD_ID}"
56         cp -R ../xul/staff_client/build/server "${WEBDIR}/xul/${STAFF_CLIENT_BUILD_ID}/"
57
58 webcore-install:
59         @echo $@
60         echo "Copying web into $(WEBDIR)"
61         mkdir -p $(ADMINDIR)
62         cp -r ../admin/* $(ADMINDIR)
63         mkdir -p $(WEBDIR)
64         mkdir -p $(WEBDIR)/js/dojo/opensrf/
65         mkdir -p $(WEBDIR)/opac/extras/xsl/
66         cp -r ../web/* $(WEBDIR)
67         cp $(OPENSRF_LIBS)/javascript/* $(WEBDIR)/opac/common/js/
68         # dojo-ified opensrf libs
69         cp $(OPENSRF_LIBS)/javascript/md5.js $(WEBDIR)/js/dojo/opensrf/
70         cp $(OPENSRF_LIBS)/javascript/JSON_v1.js $(WEBDIR)/js/dojo/opensrf/
71         cp $(OPENSRF_LIBS)/javascript/opensrf*js $(WEBDIR)/js/dojo/opensrf/
72         cp $(OPENSRF_LIBS)/javascript/DojoSRF.js $(WEBDIR)/js/dojo/
73         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/mresult.xml
74         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/rresult.xml
75         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/rdetail.xml
76         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/advanced.xml
77         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/myopac.xml
78         ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/cnbrowse.xml
79         cp ../xul/staff_client/chrome//content//util/date.js $(WEBDIR)/opac/common/js/
80         cp ../xsl/*.xsl $(WEBDIR)/opac/extras/xsl/
81         ln -sf $(ETCDIR)/fm_IDL.xml $(WEBDIR)/reports/
82         cp ../xul/staff_client/server/admin/adminlib.js $(WEBDIR)/reports/
83         mkdir -p $(WEBDIR)/opac/extras/slimpac/
84         
85
86 c_apps:
87         @echo $@
88         make -C c-apps
89         make -C extras oils_requestor
90
91 c_apps-install:
92         @echo $@
93         make -C c-apps install
94         make -C extras oils_requestor-install
95
96 autojs-install:
97         @echo $@
98         cp extras/fieldmapper.pl $(BINDIR)
99         cp extras/org_tree_js.pl $(BINDIR)
100         cp extras/org_lasso_js.pl $(BINDIR)
101         cp extras/org_tree_html_options.pl $(BINDIR)
102         cp extras/org_tree_proximity.pl $(BINDIR)
103         cp extras/autogen.sh $(BINDIR)
104         cp extras/openurl_map.pl $(BINDIR)
105         cp support-scripts/offline-blocked-list.pl $(BINDIR) # this should probably be somewhere else
106 # -----------------------------------------------------------------------------------
107
108 perl-install:
109         @echo $@
110         @echo "Installing Perl modules to $(PERLDIR)"
111         mkdir -p $(PERLDIR)
112         mkdir -p $(DATADIR)
113         mkdir -p $(BINDIR)
114         cp extras/ils_events.xml $(DATADIR)
115         cp -r perlmods/* $(PERLDIR)
116         cp ../examples/opensrf.xml.example $(ETCDIR)
117         cp ../examples/opensrf_core.xml.example $(ETCDIR)
118         cp ../examples/fm_IDL.xml $(ETCDIR)
119         cp ../examples/oils_sip.xml.example $(ETCDIR)
120         cp ../examples/hold_notification_template.example $(DATADIR)
121         cp ../examples/oils_ctl.sh $(BINDIR)
122         cp ../examples/lib_ips.txt.example $(ETCDIR)
123         mkdir -p $(TEMPLATEDIR)
124         cp -r templates/marc $(TEMPLATEDIR)
125
126 # ------------------------------------------------------------------------------
127
128 python-build:
129         if [ -n "$(EG_PYTHON_INSTALL)" ]; then echo $@; make -C python build; fi;
130
131 # -----------------------------------------------------------------------------------
132
133 python-install:
134         if [ -n "$(EG_PYTHON_INSTALL)" ]; then echo $@; make -C python install; fi;
135
136 # -----------------------------------------------------------------------------------
137
138 reporter-install:
139         @echo $@
140         @echo "Installing Reporter email templates to $(REPORTERDIR) and example configs to $(ETCDIR)"
141         cp reporter/clark-kent.pl $(BINDIR)
142         cp reporter/find_orphaned_reports.pl $(BINDIR)
143         cp reporter/report-fail $(DATADIR)
144         cp reporter/report-success $(DATADIR)
145         mkdir -p $(REPORTERDIR)
146
147 # -----------------------------------------------------------------------------------
148 offline-install:
149         @echo "Installing offline CGIs to $(CGIDIR)/offline";
150         mkdir -p $(CGIDIR)/offline;
151         mkdir -p $(DATADIR)/offline;
152         perl -pe "s{##CONFIG##}{$(ETCDIR)}" < offline/offline.pl > $(TMP)/offline.pl;
153         cp offline/offline-config.pl $(ETCDIR)
154         cp $(TMP)/offline.pl $(CGIDIR)/offline/
155         chmod +x $(CGIDIR)/offline/offline.pl
156
157 # -----------------------------------------------------------------------------------
158
159 cgi-bootstrap:
160         @echo "Installing cgi's to $(CGIDIR)"
161         mkdir -p $(TMP)/cgi-bin
162         mkdir -p $(CGIDIR)
163         for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $$i > $(TMP)/$$i; done
164         cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
165         cp -r cgi-bin/support $(CGIDIR)
166         cp cgi-bin/setup.pl $(ETCDIR)/live-db-setup.pl
167         chmod 755 $(CGIDIR)/*cgi
168
169 storage-bootstrap:
170         @echo $@
171         @echo ""
172         @echo "WARNING!"
173         @echo ""
174         @echo "storage-bootstrap will DESTROY all data within all of the ILS tables in your database."
175         @echo "The database this script will touch has a DBI DSN of"
176         @echo "    dbi:$(DBDRVR):host=$(DBHOST);dbname=$(DBNAME);port=$(DBPORT)"
177         @echo "Type control-c to avoid destroying all of the data.  Type enter to continue..."
178         @echo ""
179         @read X;
180         ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBPORT) $(DBNAME) $(DBUSER) $(DBPW) $(DBVER)
181
182 # -----------------------------------------------------------------------------------
183
184
185 string-templates-install:
186         @echo "Installing string templates to $(TEMPLATEDIR)"
187         mkdir -p $(TEMPLATEDIR)
188         cp -r templates/strings $(TEMPLATEDIR)
189
190 xsl-install:    
191         @echo "Installing XSL files to $(XSLDIR)"
192         mkdir -p $(XSLDIR)
193         cp ../xsl/*.xsl $(XSLDIR)
194 #       mkdir -p $(WEBDIR)/xsl/
195 #       cp ../xsl/*.xsl $(WEBDIR)/xsl/
196
197 clean:
198         @echo $@
199         make -C extras clean
200         make -C apachemods clean
201         make -C c-apps clean
202         if [ -n "$(EG_PYTHON_INSTALL)" ]; then echo $@; make -C python clean --all; fi;
203