root/main/trunk/greenstone2/Makefile.in @ 30561

Revision 21891, 4.4 KB (checked in by ak19, 10 years ago)

Correcting another foolish syntax error in previous major commit: Libiconv libraries are needed by the apache web server. LD_LIBRARY_PATH already contains apache's lib folder, so now, on make install of GS2, we're copying the libiconv library files into apache's lib folder so the binary release generated by the releasekit works (just like the one from svn already does).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- gsdl
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999  The New Zealand Digital Library Project
9#
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###########################################################################
26srcdir = @srcdir@
27
28PACKAGE = @PACKAGE@
29VERSION = @VERSION@
30
31@SET_MAKE@
32CC = @CC@
33CXX = @CXX@
34CFLAGS = @CFLAGS@
35CXXFLAGS = @CXXFLAGS@
36LIBS   = @LIBS@
37MDEFINES =
38
39GSDLOS = @gsdlos@
40
41COMPILE = $(CC) -c
42
43SOURCES =
44
45OBJECTS =
46
47ALLFILES = $(OBJECTS)
48
49SPECIAL_COMPILEDIRS = common-src
50COMPILEDIRS = build-src runtime-src
51
52SPECIAL_INSTALLDIRS = common-src
53INSTALLDIRS = build-src runtime-src
54
55MODULEDIRS = @MODULEDIRS@
56
57ENABLE_JNI=@ENABLE_JNI@
58ifeq ($(ENABLE_JNI), 1)
59COMPILE_TARGET=with-jni
60else
61COMPILE_TARGET=without-jni
62endif
63
64
65# with some compilers, just calling another target is insufficient
66# so an extra echo stmt is added after each call to another target
67all:    $(COMPILE_TARGET)
68    @echo "Compile done"
69
70# Upon installing, on Linux and Mac need to copy the libiconv library files
71# into apache's lib folder since apache needs the libiconv when running.
72# This is particularly necessary for the release version since its common-src
73# folder (and the libiconv libraries this contains) are not included.
74# If ever the libiconv is used by more than apache, copy libiconv into GS2's lib
75# folder rather than into apache lib folder.
76install: install-$(COMPILE_TARGET)
77    if test -d apache-httpd; then \
78      cp -r common-src/packages/iconv/lib/lib* apache-httpd/$(GSDLOS)/lib/.; \
79    fi;
80    @echo "Install done"
81
82
83with-jni without-jni:
84    for odir in $(SPECIAL_COMPILEDIRS); do \
85      if test -d $$odir; then \
86        echo making $(COMPILE_TARGET) in $$odir; \
87        (cd $$odir && $(MAKE) $(MDEFINES) $(COMPILE_TARGET)) || exit 1; \
88      fi; \
89    done
90    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
91      if test -d $$odir; then \
92        echo making all in $$odir; \
93        (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
94      fi; \
95    done
96
97install-with-jni install-without-jni: all
98    for idir in $(SPECIAL_INSTALLDIRS); do \
99      if test -d $$idir; then \
100        echo installing $$idir $(COMPILE_TARGET); \
101        (cd $$idir && $(MAKE) install-$(COMPILE_TARGET)) || exit 1; \
102      fi; \
103    done
104    for idir in $(INSTALLDIRS); do \
105      if test -d $$idir; then \
106        echo installing $$idir; \
107        (cd $$idir && $(MAKE) install) || exit 1; \
108      fi; \
109    done
110
111apache-for-dist:
112    if test -d runtime-src; then \
113      (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1; \
114    fi
115
116distclean: clean
117    rm -f Makefile config.cache config.h config.log stamp-h config.status
118    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
119      if test -d $$subdir; then \
120        echo cleaning $@ in $$subdir; \
121        (cd $$subdir && $(MAKE) distclean) || exit 1; \
122      fi; \
123    done
124
125clean:
126    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
127      if test -d $$subdir; then \
128        echo cleaning $@ in $$subdir; \
129        (cd $$subdir && $(MAKE) clean) || exit 1; \
130      fi; \
131    done
132
133# commented out - jrm21 Dec 2004 - can get confused by cvs timestamps
134# (and might run the wrong version of autoconf)
135#
136## For an explanation of the following Makefile rules, see node
137## `Automatic Remaking' in GNU Autoconf documentation.
138#Makefile: Makefile.in config.status
139#   CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
140#config.status: configure
141#   ./config.status --recheck
142#configure: configure.in aclocal.m4
143#   cd $(srcdir) && autoconf
144#
145#config.h: stamp-h
146#stamp-h: config.h.in config.status
147#   CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
148#config.h.in: stamp-h.in
149#stamp-h.in: configure.in aclocal.m4 acconfig.h
150#   cd $(srcdir) && autoheader
151#   $(TOUCH) $(srcdir)/stamp-h.in
152
153
154
Note: See TracBrowser for help on using the browser.