TPac: minor i18n string repairs
[working/Evergreen.git] / Open-ILS / src / Makefile.am
1 # Copyright (C) 2008 Equinox Software, Inc.
2 # Kevin Beswick <kevinbeswick00@gmail.com>
3 #
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.
8 #
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.
13 #
14 ## Process this file with automake to generate Makefile.in
15
16
17 export INCDIR = "$(INCLUDEDIR)/openils/"
18 export STAFF_CLIENT_BUILD_ID = `/bin/cat @top_srcdir@/Open-ILS/xul/staff_client/build/BUILD_ID`
19 export DEF_LDFLAGS = -L. -L$(TMP) -L$(OPENSRF_LIBS)
20 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)
21 export DEF_LDLIBS = -lopensrf 
22
23
24 # Establish some installation directories and such
25 prefix=@prefix@
26 exec_prefix=@exec_prefix@
27 datadir=@localstatedir@/data
28 circrulesdir=@localstatedir@/circ
29 catalogscriptdir=@localstatedir@/catalog
30 penaltyrulesdir=@localstatedir@/penalty
31 examples = @top_srcdir@/Open-ILS/examples
32 jsbackend = @srcdir@/javascript/backend
33 supportscr = @srcdir@/support-scripts
34
35 # Collect files to be used by multiple targets
36
37 autojsbinscripts = @srcdir@/extras/autogen.sh \
38         @srcdir@/support-scripts/offline-blocked-list.pl 
39
40 # Decide which entities to build
41
42 sysconf_DATA = $(examples)/action_trigger_filters.json.example \
43                $(examples)/opensrf.xml.example \
44                $(examples)/opensrf_core.xml.example \
45                $(examples)/fm_IDL.xml \
46                $(examples)/oils_sip.xml.example \
47                $(examples)/oils_web.xml.example \
48                $(examples)/lib_ips.txt.example \
49                $(examples)/oils_yaz.xml.example \
50                $(examples)/oils_z3950.xml.example 
51
52 #----------------------------
53 # Build ILS CORE
54 #----------------------------
55
56 if BUILDILSCORE
57
58 #Add directories to build
59 OILSCORE_DIRS = c-apps extras perlmods
60 #Add manual (non-automake) install targets for simplicity of installing.
61 OILSCORE_INST = ilscore-install
62
63 core_data = @srcdir@/extras/ils_events.xml \
64             $(examples)/hold_notification_template.example
65
66 core_scripts =   $(examples)/oils_ctl.sh \
67                  $(supportscr)/fine_generator.pl \
68                  $(supportscr)/hold_targeter.pl \
69                  $(supportscr)/reshelving_complete.srfsh \
70                  $(supportscr)/clear_expired_circ_history.srfsh \
71                  $(supportscr)/update_hard_due_dates.srfsh \
72                  $(supportscr)/juv_to_adult.srfsh \
73                  $(supportscr)/thaw_expired_frozen_holds.srfsh \
74                  $(supportscr)/long-overdue-status-update.pl \
75                  $(supportscr)/action_trigger_runner.pl \
76                  $(srcdir)/extras/openurl_map.pl \
77                  $(srcdir)/extras/import/marc_add_ids
78
79 installautojs = $(autojsbinscripts)
80
81 #circ-rules-install
82 circrules_SCRIPTS = $(jsbackend)/circ/circ_duration.js \
83                     $(jsbackend)/circ/circ_groups.js \
84                     $(jsbackend)/circ/circ_item_config.js \
85                     $(jsbackend)/circ/circ_lib.js \
86                     $(jsbackend)/circ/circ_permit_copy.js \
87                     $(jsbackend)/circ/circ_permit_hold.js \
88                     $(jsbackend)/circ/circ_permit_patron.js \
89                     $(jsbackend)/circ/circ_permit_renew.js 
90 penaltyrules_SCRIPTS = $(jsbackend)/penalty/patron_penalty.js
91 catalogscript_SCRIPTS = $(jsbackend)/catalog/biblio_descriptor.js \
92                         $(jsbackend)/catalog/biblio_fingerprint.js \
93                         $(jsbackend)/catalog/fixed_fields.js \
94                         $(jsbackend)/catalog/phys_char.js \
95                         $(jsbackend)/catalog/record_type.js
96
97 endif
98
99 #--------------------
100 # Build Apache modules
101 #--------------------
102
103 if BUILDAPACHEMODS
104 OILSWEB_DIR = apachemods
105 endif
106
107 #---------------------
108 # Build ILS Reporter
109 #---------------------
110
111 if BUILDILSREPORTER
112 OILSREP_INST = reporter-install
113 #reporter-install
114 reporter_scripts = @srcdir@/reporter/clark-kent.pl \
115                    @srcdir@/reporter/find_orphaned_reports.pl
116 reporter_data = @srcdir@/reporter/report-fail \
117                @srcdir@/reporter/report-success
118 endif
119
120 #------------------------------
121 # Build EVERGREEN PYTHON
122 #------------------------------
123
124 if BUILDEGPYTHON
125 OILSPYTHON_DIR = python
126 endif
127
128 #------------------------------
129 # Build EVERGREEN JAVA
130 #------------------------------
131
132 if BUILDEGJAVA
133 OILSJAVA_DIR = java
134 endif
135
136 bin_SCRIPTS = $(core_scripts) $(reporter_scripts) $(installautojs) @srcdir@/extras/eg_config @srcdir@/extras/fast-extract @srcdir@/extras/import/marc2are.pl @srcdir@/extras/import/marc2bre.pl @srcdir@/extras/import/marc2sre.pl @srcdir@/extras/import/parallel_pg_loader.pl $(supportscr)/marc_export
137 data_DATA = $(core_data) $(reporter_data)
138
139 # Take care of which subdirectories to build, and which extra files to include in a distribution.
140
141 SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIR) $(OILSPYTHON_DIR) $(OILSJAVA_DIR)
142
143 EXTRA_DIST = @srcdir@/perlmods @srcdir@/templates @top_srcdir@/Open-ILS/xsl @srcdir@/cgi-bin
144
145 # Install header files
146
147 oilsincludedir = @includedir@/openils
148 headsdir = @top_srcdir@/Open-ILS/include/openils
149 oilsinclude_HEADERS = $(headsdir)/idl_fieldmapper.h $(headsdir)/oils_constants.h $(headsdir)/oils_event.h $(headsdir)/oils_idl.h $(headsdir)/oils_utils.h
150
151 # Install everything that did not get installed by autotools
152
153 install-data-hook: $(OILSCORE_INST) $(OILSWEB_INST) $(OILSUPDATES_INST) $(OILSREP_INST)
154
155 uninstall-hook:
156         rm -R $(TEMPLATEDIR)
157         rm -R $(XSLDIR)
158         rm -R $(CGIDIR)
159
160
161 #perl-install and string-templates-install      
162 ilscore-install:
163         @echo $@
164         $(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
165         @echo "Installing templates to $(DESTDIR)$(TEMPLATEDIR)"
166         cp -r @srcdir@/templates/* $(DESTDIR)$(TEMPLATEDIR)
167         $(MKDIR_P) $(DESTDIR)$(datadir)/overdue/
168         sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
169         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
170         sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
171         sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
172         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
173         sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
174         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
175         sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
176         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/autogen.sh'
177         sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/autogen.sh'
178         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/autogen.sh'
179         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/reshelving_complete.srfsh'
180         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/clear_expired_circ_history.srfsh'
181         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/update_hard_due_dates.srfsh'
182         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/juv_to_adult.srfsh'
183         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
184         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
185         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/thaw_expired_frozen_holds.srfsh'
186         sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/offline-blocked-list.pl'
187         sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
188         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
189
190 reporter-install:
191         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/clark-kent.pl'
192         sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/find_orphaned_reports.pl'
193
194