fixing case of only negated words
[Evergreen.git] / Open-ILS / src / Makefile
1
2 export TMPDIR                   = $(TMP)/opensrf
3 export LDFLAGS                  = -L $(TMPDIR) -L .
4 export CFLAGS                   = -pipe -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) \
5                                                                 -I$(LIBXML2_HEADERS)/libxml  -I$(TMP) -I$(TMPDIR)
6
7 export INCDIR = "$(INCLUDEDIR)/openils/"
8
9 all: mod_xmlbuilder mod_ils_rest_gateway c_apps
10
11 install:        perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install c_apps-install
12
13 web-install:    webcore-install autojs-install  mod_xmlbuilder-install mod_ils_rest_gateway-install
14
15
16 # -----------------------------------------------------------------------------------
17 # Web stuff
18 # -----------------------------------------------------------------------------------
19 mod_ils_rest_gateway:
20         @echo $@
21         make -C apachemods mod_ils_rest_gateway.so
22
23 mod_ils_rest_gateway-install:
24         @echo $@
25         make -C apachemods libfieldmapper-install
26         make -C apachemods mod_ils_rest_gateway-install
27
28 mod_xmlbuilder:
29         @echo $@
30         make -C apachemods mod_xmlbuilder.so
31
32 mod_xmlbuilder-install:
33         @echo $@
34         make -C apachemods mod_xmlbuilder-install
35
36 webcore-install:
37         @echo $@
38         echo "Copying web into $(WEBDIR)"
39         mkdir -p $(WEBDIR)
40         cp -r ../web/* $(WEBDIR)
41
42 libfieldmapper: 
43         make -C apachemods libfieldmapper.so
44
45 libfieldmapper-install: 
46         make -C apachemods libfieldmapper-install
47
48 c_apps: libfieldmapper
49         @echo $@
50         make -C c-apps
51
52 c_apps-install: libfieldmapper-install
53         @echo $@
54         make -C c-apps install
55
56 autojs-install:
57         @echo $@
58         cp extras/fieldmapper.pl $(BINDIR)
59         cp extras/org_tree_js.pl $(BINDIR)
60         cp extras/autogen.sh $(BINDIR)
61 # -----------------------------------------------------------------------------------
62
63 marcdumper:
64         @echo $@
65         make -C extras/marcdumper
66
67 marcdumper-install:
68         @echo $@
69         make -C extras/marcdumper install
70
71 # -----------------------------------------------------------------------------------
72
73 perl-install:
74         @echo $@
75         @echo "Installing Perl modules to $(PERLDIR)"
76         mkdir -p $(PERLDIR)
77         mkdir -p $(DATADIR)
78         cp extras/ils_events.xml $(DATADIR)
79         cp -r perlmods/* $(PERLDIR)
80         cp ../examples/openils.xml.example $(ETCDIR)
81         mkdir -p $(TEMPLATEDIR)
82         cp -r templates/marc $(TEMPLATEDIR)
83
84 # -----------------------------------------------------------------------------------
85
86 reporter-install:
87         @echo $@
88         @echo "Installing Reporter templates to $(REPORTERDIR) and example configs to $(ETCDIR)"
89         cp reporter/report_base.example.xml $(ETCDIR)/reporter.example.xml
90         cp reporter/tables.example.xml $(ETCDIR)
91         cp reporter/widgets.example.xml $(ETCDIR)
92         mkdir -p $(REPORTERDIR)
93         cp -r reporter/templates/* $(REPORTERDIR)
94
95 # -----------------------------------------------------------------------------------
96
97 cgi-bootstrap:
98         @echo "Installing cgi's to $(CGIDIR)"
99         mkdir -p $(TMP)/cgi-bin
100         mkdir -p $(CGIDIR)
101         for i in cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{$(ETCDIR)}" < $$i > $(TMP)/$$i; done
102         cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
103         cp -r cgi-bin/support $(CGIDIR)
104         cp cgi-bin/setup.pl $(ETCDIR)/live-db-setup.pl
105
106 storage-bootstrap:
107         ./extras/import/build-oils-db.sh $(DBDRVR) $(DBHOST) $(DBNAME) $(DBUSER) $(DBPW)
108
109 # -----------------------------------------------------------------------------------
110
111
112 string-templates-install:
113         @echo "Installing string templates to $(TEMPLATEDIR)"
114         mkdir -p $(TEMPLATEDIR)
115         cp -r templates/strings $(TEMPLATEDIR)
116
117 xsl-install:    
118         @echo "Installing XSL files to $(XSLDIR)"
119         mkdir -p $(XSLDIR)
120         cp ../xsl/*.xsl $(XSLDIR)
121
122 clean:
123         @echo $@
124         make -C extras clean
125         make -C apachemods clean
126