1 # Copyright (C) 2008 Equinox Software, Inc.
2 # Kevin Beswick <kevinbeswick00@gmail.com>
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 ## Process this file with automake to generate Makefile.in
17 export STAFF_CLIENT_BUILD_ID = `/bin/cat @top_srcdir@/Open-ILS/xul/staff_client/build/BUILD_ID`
18 export DEF_LDFLAGS = -L. -L$(TMP) -L$(OPENSRF_LIBS)
19 export DEF_CFLAGS = -D_LARGEFILE64_SOURCE -pipe -g -Wall -O2 -fPIC -I@top_srcdir@/include -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -I$(LIBXML2_HEADERS)/libxml -I$(TMP) -I$(OPENSRF_HEADERS)
20 export DEF_LDLIBS = -lopensrf
23 # Establish some installation directories and such
25 exec_prefix=@exec_prefix@
26 datadir=@localstatedir@/data
27 examples = @top_srcdir@/Open-ILS/examples
28 supportscr = @srcdir@/support-scripts
30 # Collect files to be used by multiple targets
32 autojsbinscripts = @srcdir@/extras/autogen.sh
34 # Decide which entities to build
36 sysconf_DATA = $(examples)/action_trigger_filters.json.example \
37 $(examples)/opensrf.xml.example \
38 $(examples)/opensrf_core.xml.example \
39 $(examples)/fm_IDL.xml \
40 $(examples)/oils_sip.xml.example \
41 $(examples)/lib_ips.txt.example \
42 $(examples)/oils_yaz.xml.example \
43 $(examples)/kpac.xml.example \
44 $(examples)/oils_z3950.xml.example \
45 $(examples)/marc_stream_importer.conf.example
47 #----------------------------
49 #----------------------------
53 #Add directories to build
54 OILSCORE_DIRS = c-apps extras perlmods
55 #Add manual (non-automake) install targets for simplicity of installing.
56 OILSCORE_INST = ilscore-install
58 core_data = @srcdir@/extras/ils_events.xml \
59 $(examples)/hold_notification_template.example
61 core_scripts = $(examples)/oils_ctl.sh \
62 $(supportscr)/fine_generator.pl \
63 $(supportscr)/hold_targeter.pl \
64 $(supportscr)/hold_targeter_legacy.pl \
65 $(supportscr)/reshelving_complete.srfsh \
66 $(supportscr)/clear_expired_circ_history.srfsh \
67 $(supportscr)/update_hard_due_dates.srfsh \
68 $(supportscr)/refresh_carousels.srfsh \
69 $(supportscr)/juv_to_adult.srfsh \
70 $(supportscr)/thaw_expired_frozen_holds.srfsh \
71 $(supportscr)/long-overdue-status-update.pl \
72 $(supportscr)/oils_header.pl \
73 $(supportscr)/purge_at_events.srfsh \
74 $(supportscr)/purge_holds.srfsh \
75 $(supportscr)/purge_circulations.srfsh \
76 $(supportscr)/purge_pending_users.srfsh \
77 $(supportscr)/clear_cc_number.srfsh \
78 $(supportscr)/sitemap_generator \
79 $(srcdir)/extras/eg_config \
80 $(srcdir)/extras/openurl_map.pl \
81 $(srcdir)/extras/import/marc_add_ids \
82 $(supportscr)/pingest.pl
84 installautojs = $(autojsbinscripts)
89 # Build Apache modules
93 OILSWEB_DIR = apachemods
96 #---------------------
98 #---------------------
101 OILSREP_INST = reporter-install
103 reporter_scripts = @srcdir@/reporter/clark-kent.pl \
104 @srcdir@/reporter/find_orphaned_reports.pl
105 reporter_data = @srcdir@/reporter/report-fail \
106 @srcdir@/reporter/report-success
109 #------------------------------
110 # Build EVERGREEN PYTHON
111 #------------------------------
114 OILSPYTHON_DIR = python
117 #------------------------------
118 # Build EVERGREEN JAVA
119 #------------------------------
125 # scripts that are generated from *.in files and can
126 # be deleted by a make clean
128 @srcdir@/extras/fast-extract \
129 @srcdir@/extras/import/marc2are.pl \
130 @srcdir@/extras/import/marc2bre.pl \
131 @srcdir@/extras/import/marc2sre.pl \
132 @srcdir@/extras/import/parallel_pg_loader.pl \
133 $(supportscr)/action_trigger_aggregator.pl \
134 $(supportscr)/action_trigger_runner.pl \
135 $(supportscr)/authority_control_fields.pl \
136 $(supportscr)/authority_authority_linker.pl \
137 $(supportscr)/eg_db_config \
138 $(supportscr)/marc_export \
139 $(supportscr)/marc_stream_importer.pl \
140 $(supportscr)/offline-blocked-list.pl
142 # config files that are generated from *.in files and can
143 # be deleted by a make clean
145 $(examples)/apache_24/eg_startup \
146 $(examples)/apache_24/eg_24.conf \
147 $(examples)/apache_24/eg_vhost_24.conf
149 bin_SCRIPTS = $(core_scripts) $(gen_scripts) $(reporter_scripts) $(installautojs)
151 CLEANFILES = $(gen_scripts)
153 data_DATA = $(core_data) $(reporter_data)
155 doc_DATA = $(gen_docs)
157 # Take care of which subdirectories to build, and which extra files to include in a distribution.
159 SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIR) $(OILSPYTHON_DIR) $(OILSJAVA_DIR)
161 EXTRA_DIST = @srcdir@/perlmods \
164 @top_srcdir@/Open-ILS/xsl \
168 @srcdir@/extras/eg_config
171 -e 's,[@]bindir[@],$(bindir),g' \
172 -e 's,[@]datarootdir[@],$(datarootdir),g' \
173 -e 's,[@]docdir[@],$(docdir),g' \
174 -e 's,[@]exec_prefix[@],$(exec_prefix),g' \
175 -e 's,[@]includedir[@],$(includedir),g' \
176 -e 's,[@]libdir[@],$(libdir),g' \
177 -e 's,[@]localstatedir[@],$(localstatedir),g' \
178 -e 's,[@]prefix[@],$(prefix),g' \
179 -e 's,[@]sysconfdir[@],$(sysconfdir),g'
181 # Install header files
183 oilsincludedir = @includedir@/openils
184 headsdir = @top_srcdir@/Open-ILS/include/openils
185 oilsinclude_HEADERS = $(headsdir)/idl_fieldmapper.h $(headsdir)/oils_constants.h $(headsdir)/oils_event.h $(headsdir)/oils_idl.h $(headsdir)/oils_utils.h
187 # Install everything that did not get installed by autotools
189 install-data-hook: $(OILSCORE_INST) $(OILSWEB_INST) $(OILSUPDATES_INST) $(OILSREP_INST)
196 @srcdir@/extras/fast-extract: Makefile @srcdir@/extras/fast-extract.in
197 $(do_subst) @srcdir@/extras/fast-extract.in > "$@"
200 @srcdir@/extras/import/marc2are.pl: Makefile @srcdir@/extras/import/marc2are.pl.in
201 $(do_subst) @srcdir@/extras/import/marc2are.pl.in > "$@"
204 @srcdir@/extras/import/marc2bre.pl: Makefile @srcdir@/extras/import/marc2bre.pl.in
205 $(do_subst) @srcdir@/extras/import/marc2bre.pl.in > "$@"
208 @srcdir@/extras/import/marc2sre.pl: Makefile @srcdir@/extras/import/marc2sre.pl.in
209 $(do_subst) @srcdir@/extras/import/marc2sre.pl.in > "$@"
212 @srcdir@/extras/import/parallel_pg_loader.pl: Makefile @srcdir@/extras/import/parallel_pg_loader.pl.in
213 $(do_subst) @srcdir@/extras/import/parallel_pg_loader.pl.in > "$@"
216 $(supportscr)/action_trigger_aggregator.pl: Makefile $(supportscr)/action_trigger_aggregator.pl.in
217 $(do_subst) $(supportscr)/action_trigger_aggregator.pl.in > "$@"
220 $(supportscr)/action_trigger_runner.pl: Makefile $(supportscr)/action_trigger_runner.pl.in
221 $(do_subst) $(supportscr)/action_trigger_runner.pl.in > "$@"
224 $(supportscr)/authority_authority_linker.pl: Makefile $(supportscr)/authority_authority_linker.pl.in
225 $(do_subst) $(supportscr)/authority_authority_linker.pl.in > "$@"
228 $(supportscr)/authority_control_fields.pl: Makefile $(supportscr)/authority_control_fields.pl.in
229 $(do_subst) $(supportscr)/authority_control_fields.pl.in > "$@"
232 $(supportscr)/eg_db_config: Makefile $(supportscr)/eg_db_config.in
233 $(do_subst) $(supportscr)/eg_db_config.in > "$@"
236 $(supportscr)/marc_export: Makefile $(supportscr)/marc_export.in
237 $(do_subst) $(supportscr)/marc_export.in > "$@"
240 $(supportscr)/marc_stream_importer.pl: Makefile $(supportscr)/marc_stream_importer.pl.in
241 $(do_subst) $(supportscr)/marc_stream_importer.pl.in > "$@"
244 $(supportscr)/offline-blocked-list.pl: Makefile $(supportscr)/offline-blocked-list.pl.in
245 $(do_subst) $(supportscr)/offline-blocked-list.pl.in > "$@"
248 $(examples)/apache_24/eg_startup: Makefile $(examples)/apache_24/eg_startup.in
249 $(do_subst) $(examples)/apache_24/eg_startup.in > "$@"
251 $(examples)/apache_24/eg_24.conf: Makefile $(examples)/apache_24/eg.conf.in
252 $(do_subst) $(examples)/apache_24/eg.conf.in > "$@"
254 $(examples)/apache_24/eg_vhost_24.conf: Makefile $(examples)/apache_24/eg_vhost.conf.in
255 $(do_subst) $(examples)/apache_24/eg_vhost.conf.in > "$@"
257 #perl-install and string-templates-install
260 $(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
261 @echo "Installing templates to $(DESTDIR)$(TEMPLATEDIR)"
262 cp -r @srcdir@/templates/* $(DESTDIR)$(TEMPLATEDIR)
263 -@if test -d @srcdir@/data/locale; then \
264 $(MKDIR_P) $(DESTDIR)$(datadir)/locale/ && \
265 echo "Installing template data files to $(datadir)/locale/" && \
266 cp -r @srcdir@/data/locale/* $(datadir)/locale/ ;\
268 $(MKDIR_P) $(DESTDIR)$(datadir)/overdue/
269 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
270 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
271 sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
272 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
273 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
274 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
275 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
276 sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
277 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/marc_stream_importer.conf.example'
278 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/marc_stream_importer.conf.example'
279 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/autogen.sh'
280 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/autogen.sh'
281 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/autogen.sh'
282 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/reshelving_complete.srfsh'
283 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/clear_expired_circ_history.srfsh'
284 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/update_hard_due_dates.srfsh'
285 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/refresh_carousels.srfsh'
286 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/juv_to_adult.srfsh'
287 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
288 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
289 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/thaw_expired_frozen_holds.srfsh'
290 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/clear_cc_number.srfsh'
291 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/purge_at_events.srfsh'
292 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/purge_circulations.srfsh'
293 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/purge_holds.srfsh'
294 sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/purge_pending_users.srfsh'
295 sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
296 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
299 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/clark-kent.pl'
300 sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/find_orphaned_reports.pl'
302 docs-install: gen_docs
303 $(MKDIR_P) $(DESTDIR)$(docdir)