source: main/trunk/greenstone2/runtime-src/packages/Makefile.in@ 28865

Last change on this file since 28865 was 28865, checked in by ak19, 10 years ago

Replacing owasp-esapi-for-c package and dependencies with the owasp-esapi-for-c++ package and dependencies. Part 1

File size: 6.4 KB
Line 
1###########################################################################
2#
3# Makefile -- Makefile for packages included with Greenstone runtime
4#
5# A component of the Greenstone digital library software
6# from the New Zealand Digital Library Project at the
7# University of Waikato, New Zealand.
8#
9# Copyright (C) 2000 New Zealand Digital Library Project
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27
28USE_Z3950=@USE_Z3950@
29USE_YAZ=@USE_YAZ@
30USE_APACHE_HTTPD=@USE_APACHE_HTTPD@
31
32
33SECURITY=security/libgpg-error-1.12
34#security/libgcrypt-1.6.1
35
36ifeq ($(USE_Z3950), 1)
37# make sure USE_YAZ is set
38USE_YAZ=1
39D2M=d2m
40else
41D2M=
42endif
43
44ifeq ($(USE_YAZ), 1)
45# we only compile the src and client dirs for now.
46YAZ=yaz/yaz-2.1.4/src yaz/yaz-2.1.4/client
47else
48YAZ=
49endif
50
51
52USE_CORBA=@USE_CORBA@
53MICO_DIR=@MICO_DIR@
54ifeq ($(USE_CORBA), 1)
55ifeq ($(MICO_DIR), default)
56CORBA="mico/mico"
57else
58CORBA=
59endif
60else
61CORBA=
62endif
63
64GSDLOS = @gsdlos@
65
66ifeq ($(USE_APACHE_HTTPD), 1)
67HTTPD=apache-httpd/httpd-2.2.11
68else
69HTTPD=
70endif
71
72
73# PACKAGEDIRS contains the packages that we want to make and install. It
74# is assumed that each package will have at least four rules: all, install,
75# clean, and distclean.
76INSTALLDIRS = $(YAZ) $(D2M) $(CORBA) $(SECURITY)
77PACKAGEDIRS = $(INSTALLDIRS) $(HTTPD)
78
79REPLACELIST = conf/extra/httpd-dav.conf \
80 conf/extra/httpd-manual.conf \
81 conf/extra/httpd-autoindex.conf \
82 conf/extra/httpd-vhosts.conf \
83 conf/extra/httpd-ssl.conf \
84 conf/extra/httpd-multilang-errordoc.conf \
85 conf/original/extra/httpd-dav.conf \
86 conf/original/extra/httpd-manual.conf \
87 conf/original/extra/httpd-autoindex.conf \
88 conf/original/extra/httpd-vhosts.conf \
89 conf/original/extra/httpd-ssl.conf \
90 conf/original/extra/httpd-multilang-errordoc.conf \
91 conf/original/httpd.conf\
92 lib/apr-util-1/apr_dbd_odbc.la \
93 lib/apr-util-1/apr_dbd_sqlite3.la \
94 lib/pkgconfig/apr-util-1.pc \
95 lib/pkgconfig/apr-1.pc \
96 lib/libaprutil-1.la \
97 lib/libapr-1.la \
98 build/config_vars.mk \
99 build/config.nice \
100 build/apr_rules.mk \
101 bin/dbmmanage \
102 bin/apu-1-config \
103 bin/apr-1-config \
104 include/ap_config_auto.h \
105 include/ap_config_layout.h
106
107all:
108 for odir in $(PACKAGEDIRS); do \
109 echo making $@ in $$odir; \
110 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
111 done
112ifeq ($(USE_APACHE_HTTPD), 1)
113# Need to make install here, otherwise src/recpt won't be able
114# to compile mod_gsdl.cpp with installed header files etc.
115 (cd $(HTTPD) && $(MAKE) $(MDEFINES) install) || exit
116endif
117
118ifeq ($(CORBA), "mico/mico")
119 cd mico/mico; $(MAKE) $(MDEFINES) install
120 mkdir -p ../bin/linux
121 mkdir -p ../lib
122 mkdir -p ../include
123 mkdir -p ../man
124 cp -f mico/bin/* ../bin/linux
125 cp -f mico/lib/* ../lib/
126 cp -fr mico/include/* ../include
127 cp -fr mico/man ../man
128endif
129ifeq ($(USE_YAZ), 1)
130# need to do make install in include and src dirs to get the header files and
131# lib file into the right place
132 cd yaz/yaz-2.1.4/include; $(MAKE) $(MDEFINES) install
133 cd yaz/yaz-2.1.4/src; $(MAKE) $(MDEFINES) install
134endif
135
136# make install all packages in the security folder
137
138
139# now install everything except apache, since that had already been installed during "all"
140install:
141 for idir in $(INSTALLDIRS); do \
142 echo installing $$idir; \
143 (cd $$idir && $(MAKE) install) || exit 1; \
144 done
145ifeq ($(USE_APACHE_HTTPD), 1)
146 mkdir -p ../../apache-httpd/$(GSDLOS)/conf
147 cp -f apache-httpd/httpd.conf.in ../../apache-httpd/$(GSDLOS)/conf/.
148 mkdir -p ../../etc/logs-gsi
149 @ echo "*************** INFO ***************"
150 @ echo "Run: source setup.bash, to set up the environment for greenstone"
151 @ echo "Type: make configure-admin, to set the admin password"
152 @ echo "Edit: llssite.cfg files to change the port number if necessary"
153 @ echo "Type: make configure-web, to configure the included apache webserver"
154 @ echo "EITHER type: make web-start, to launch the webserver from the command-line"
155 @ echo "OR run: gs2-server.sh, to launch the GUI version of the included webserver"
156 @ echo "************************************"
157endif
158
159clean:
160 for subdir in $(PACKAGEDIRS); do \
161 echo cleaning $@ in $$subdir; \
162 (cd $$subdir && $(MAKE) clean || exit 0) ; \
163 done
164
165distclean:
166 rm -f Makefile
167 for subdir in $(PACKAGEDIRS); do \
168 echo cleaning $@ in $$subdir; \
169 (cd $$subdir && $(MAKE) distclean || exit 0) ; \
170 done
171
172apache-for-dist:
173 ( httpddir=`cd ./apache-httpd/httpd* ; pwd` ; \
174 cp $$httpddir/support/apxs.in ../../apache-httpd/$(GSDLOS)/apxs.in ; \
175 cp apache-httpd/install-bindist.sh ../../apache-httpd/$(GSDLOS)/install-bindist.sh ; \
176 chmod 755 ../../apache-httpd/$(GSDLOS)/install-bindist.sh ; \
177 gsdldir=`cd ../.. ; pwd` ; \
178 pre="$$gsdldir/apache-httpd/$(GSDLOS)" ; \
179 for one_file in apachectl envvars envvars-std; do \
180 sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" "$$pre/bin/$$one_file" > "$$pre/bin/$$one_file.in" ; \
181 cp "$$pre/bin/$$one_file.in" "$$pre/bin/$$one_file" ; \
182 done ; \
183 for one_file in $(REPLACELIST); do \
184 sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" "$$pre/$$one_file" > "$$pre/$$one_file.in" ; \
185 cp "$$pre/$$one_file.in" "$$pre/$$one_file" ; \
186 done ; \
187 cat "$$pre/bin/apr-1-config" \
188 | sed -e "s%^APR_SOURCE_DIR=.*%APR_SOURCE_DIR=%" \
189 | sed -e "s%^APR_BUILD_DIR=.*%APR_BUILD_DIR=%" \
190 > "$$pre/bin/apr-1-config.in" ; \
191 cp "$$pre/bin/apr-1-config.in" "$$pre/bin/apr-1-config" ; \
192 cat "$$pre/bin/apu-1-config" \
193 | sed -e "s%^APU_SOURCE_DIR=.*%APU_SOURCE_DIR=%" \
194 | sed -e "s%^APU_BUILD_DIR=.*%APU_BUILD_DIR=%" \
195 > "$$pre/bin/apu-1-config.in" ; \
196 cp "$$pre/bin/apu-1-config.in" "$$pre/bin/apu-1-config" ; \
197 sed -e "s%^EXTRA_INCLUDES\s*=.*%EXTRA_INCLUDES=%" "$$pre/build/config_vars.mk" > "$$pre/build/config_vars.mk.in" ; \
198 cp "$$pre/build/config_vars.mk.in" "$$pre/build/config_vars.mk" ; )
Note: See TracBrowser for help on using the repository browser.