source: gsdl/trunk/runtime-src/packages/Makefile.in@ 19260

Last change on this file since 19260 was 19260, checked in by davidb, 15 years ago

Tweak to ensure Apache (if enabled) is installed before src/recpt is compiled. Need so mod_gsdl.cpp can be compiled

File size: 6.2 KB
RevLine 
[16568]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@
[18483]30USE_APACHE_HTTPD=@USE_APACHE_HTTPD@
[16568]31
32ifeq ($(USE_Z3950), 1)
33# make sure USE_YAZ is set
34USE_YAZ=1
35D2M=d2m
36else
37D2M=
38endif
39
40ifeq ($(USE_YAZ), 1)
41# we only compile the src and client dirs for now.
42YAZ=yaz/yaz-2.1.4/src yaz/yaz-2.1.4/client
43else
44YAZ=
45endif
46
47
48USE_CORBA=@USE_CORBA@
49MICO_DIR=@MICO_DIR@
50ifeq ($(USE_CORBA), 1)
51ifeq ($(MICO_DIR), default)
52CORBA="mico/mico"
53else
54CORBA=
55endif
56else
57CORBA=
58endif
59
[18761]60GSDLOS = @gsdlos@
[18483]61
62ifeq ($(USE_APACHE_HTTPD), 1)
63HTTPD=apache-httpd/httpd-2.2.11
64else
65HTTPD=
66endif
67
68
[16568]69# PACKAGEDIRS contains the packages that we want to make and install. It
70# is assumed that each package will have at least four rules: all, install,
71# clean, and distclean.
[18483]72PACKAGEDIRS = $(YAZ) $(D2M) $(CORBA) $(HTTPD)
[16568]73
[19036]74REPLACELIST = conf/extra/httpd-dav.conf \
75 conf/extra/httpd-manual.conf \
76 conf/extra/httpd-autoindex.conf \
77 conf/extra/httpd-vhosts.conf \
78 conf/extra/httpd-ssl.conf \
79 conf/extra/httpd-multilang-errordoc.conf \
80 conf/original/extra/httpd-dav.conf \
81 conf/original/extra/httpd-manual.conf \
82 conf/original/extra/httpd-autoindex.conf \
83 conf/original/extra/httpd-vhosts.conf \
84 conf/original/extra/httpd-ssl.conf \
85 conf/original/extra/httpd-multilang-errordoc.conf \
86 conf/original/httpd.conf\
87 lib/apr-util-1/apr_dbd_odbc.la \
88 lib/apr-util-1/apr_dbd_sqlite3.la \
89 lib/pkgconfig/apr-util-1.pc \
90 lib/pkgconfig/apr-1.pc \
91 lib/libaprutil-1.la \
92 lib/libapr-1.la \
93 build/config_vars.mk \
94 build/config.nice \
95 build/apr_rules.mk \
96 bin/apu-1-config \
97 bin/apr-1-config \
98 include/ap_config_auto.h \
99 include/ap_config_layout.h
[16568]100
101all:
102 for odir in $(PACKAGEDIRS); do \
103 echo making $@ in $$odir; \
104 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
105 done
[19260]106ifeq ($(USE_APACHE_HTTPD), 1)
107 # Need to make install here, otherwise src/recpt won't be able
108 # to compile mod_gsdl.cpp with installed header files etc.
109 (cd $(HTTPD) && $(MAKE) $(MDEFINES) install) || exit
110endif
111
[16568]112ifeq ($(CORBA), "mico/mico")
113 cd mico/mico; $(MAKE) $(MDEFINES) install
114 mkdir -p ../bin/linux
115 mkdir -p ../lib
116 mkdir -p ../include
117 mkdir -p ../man
118 cp -f mico/bin/* ../bin/linux
119 cp -f mico/lib/* ../lib/
120 cp -fr mico/include/* ../include
121 cp -fr mico/man ../man
122endif
123ifeq ($(USE_YAZ), 1)
124# need to do make install in include and src dirs to get the header files and
125# lib file into the right place
126 cd yaz/yaz-2.1.4/include; $(MAKE) $(MDEFINES) install
127 cd yaz/yaz-2.1.4/src; $(MAKE) $(MDEFINES) install
128endif
129
130install:
131 for idir in $(PACKAGEDIRS); do \
132 echo installing $$idir; \
133 (cd $$idir && $(MAKE) install) || exit 1; \
134 done
[18676]135ifeq ($(USE_APACHE_HTTPD), 1)
[18826]136 mkdir -p ../../apache-httpd/$(GSDLOS)/conf
137 cp -f apache-httpd/httpd.conf.in ../../apache-httpd/$(GSDLOS)/conf/.
[18724]138 mkdir -p ../../etc/logs-gsi
[18721]139 @ echo "*************** INFO ***************"
140 @ echo "Run: source setup.bash, to set up the environment for greenstone"
[18681]141 @ echo "Type: make configure-admin, to set the admin password"
[18872]142 @ echo "Edit: llssite.cfg and glisite.cfg files to change the port number if necessary"
[18681]143 @ echo "Type: make configure-web, to configure the included apache webserver"
144 @ echo "EITHER type: make web-start, to launch the webserver from the command-line"
145 @ echo "OR run: gs2-server.sh, to launch the GUI version of the included webserver"
[18721]146 @ echo "************************************"
[18676]147endif
[16568]148
149clean:
150 for subdir in $(PACKAGEDIRS); do \
151 echo cleaning $@ in $$subdir; \
152 (cd $$subdir && $(MAKE) clean || exit 0) ; \
153 done
154
155distclean:
156 for subdir in $(PACKAGEDIRS); do \
157 echo cleaning $@ in $$subdir; \
158 (cd $$subdir && $(MAKE) distclean || exit 0) ; \
159 done
[18815]160
161apache-for-dist:
[18826]162 ( httpddir=`cd ./apache-httpd/httpd* ; pwd` ; \
163 cp $$httpddir/support/apxs.in ../../apache-httpd/$(GSDLOS)/apxs.in ; \
164 cp apache-httpd/install-bindist.sh ../../apache-httpd/$(GSDLOS)/install-bindist.sh ; \
165 chmod 755 ../../apache-httpd/$(GSDLOS)/install-bindist.sh ; \
166 gsdldir=`cd ../.. ; pwd` ; \
[19036]167 pre="$$gsdldir/apache-httpd/$(GSDLOS)" ; \
[18826]168 for one_file in apachectl envvars envvars-std; do \
[19036]169 sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" $$pre/bin/$$one_file > $$pre/bin/$$one_file.tmp ; \
170 mv $$pre/bin/$$one_file.tmp $$pre/bin/$$one_file ; \
171 done ; \
172 for one_file in $(REPLACELIST); do \
173 sed -e "s%$$pre%*\*\APACHE_HOME_OS\*\*%" "$$pre/$$one_file" > "$$pre/$$one_file.tmp" ; \
174 mv "$$pre/$$one_file.tmp" "$$pre/$$one_file" ; \
175 done ; \
176 cat "$$pre/bin/apr-1-config" \
177 | sed -e "s%^APR_SOURCE_DIR=.*%APR_SOURCE_DIR=%" \
178 | sed -e "s%^APR_BUILD_DIR=.*%APR_BUILD_DIR=%" \
179 > "$$pre/bin/apr-1-config.tmp" ; \
180 mv "$$pre/bin/apr-1-config.tmp" "$$pre/bin/apr-1-config" ; \
181 cat "$$pre/bin/apu-1-config" \
182 | sed -e "s%^APU_SOURCE_DIR=.*%APU_SOURCE_DIR=%" \
183 | sed -e "s%^APU_BUILD_DIR=.*%APU_BUILD_DIR=%" \
184 > "$$pre/bin/apu-1-config.tmp" ; \
185 mv "$$pre/bin/apu-1-config.tmp" "$$pre/bin/apu-1-config" ; \
186 sed -e "s%^EXTRA_INCLUDES\s*=.*%EXTRA_INCLUDES=%" "$$pre/build/config_vars.mk" > "$$pre/build/config_vars.mk.tmp" ; \
187 mv "$$pre/build/config_vars.mk.tmp" "$$pre/build/config_vars.mk" ; )
Note: See TracBrowser for help on using the repository browser.