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