[559] | 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 | ###########################################################################
|
---|
[1935] | 26 | srcdir = @srcdir@
|
---|
[559] | 27 |
|
---|
[552] | 28 | PACKAGE = @PACKAGE@
|
---|
| 29 | VERSION = @VERSION@
|
---|
| 30 |
|
---|
| 31 | @SET_MAKE@
|
---|
| 32 | CC = @CC@
|
---|
| 33 | CPP = @CXX@
|
---|
| 34 | CFLAGS = @CFLAGS@
|
---|
| 35 | LIBS = @LIBS@
|
---|
[555] | 36 | MDEFINES =
|
---|
| 37 | TOPSRC = `pwd`
|
---|
[552] | 38 |
|
---|
[704] | 39 | GSDLOS = @gsdlos@
|
---|
| 40 |
|
---|
[552] | 41 | COMPILE = $(CC) -c
|
---|
| 42 |
|
---|
[555] | 43 | SOURCES =
|
---|
[552] | 44 |
|
---|
[555] | 45 | OBJECTS =
|
---|
[552] | 46 |
|
---|
| 47 | ALLFILES = $(OBJECTS)
|
---|
| 48 |
|
---|
[1671] | 49 | INSTALLDIRS = src/recpt src/txt2db src/db2txt src/hashfile src/getpw packages/mg src/phind/generate packages
|
---|
[552] | 50 |
|
---|
[1714] | 51 | OTHERDIRS = packages packages/mg lib src/mgpp src/colservr src/recpt src/txt2db src/db2txt src/hashfile src/getpw src/phind/generate
|
---|
[559] | 52 |
|
---|
[552] | 53 | all:
|
---|
[559] | 54 | for odir in $(OTHERDIRS); do \
|
---|
| 55 | echo making $@ in $$odir; \
|
---|
| 56 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
[552] | 57 | done
|
---|
| 58 |
|
---|
[704] | 59 | install:
|
---|
[1860] | 60 |
|
---|
[559] | 61 | for idir in $(INSTALLDIRS); do \
|
---|
| 62 | echo installing $$idir; \
|
---|
| 63 | (cd $$idir && $(MAKE) install) || exit 1; \
|
---|
| 64 | done
|
---|
| 65 |
|
---|
[1517] | 66 | # added test to check existence of Makefile, as src/recpt is in
|
---|
| 67 | # both INSTALLDIRS and OTHERDIRS - can't make distclean twice!
|
---|
[992] | 68 | distclean:
|
---|
[1078] | 69 | rm -f Makefile config.cache config.h config.log stamp-h config.status
|
---|
[559] | 70 | for subdir in $(INSTALLDIRS) $(OTHERDIRS); do \
|
---|
[555] | 71 | echo cleaning $@ in $$subdir; \
|
---|
[1517] | 72 | (cd $$subdir && if test -e Makefile; then $(MAKE) distclean;fi) || exit 1; \
|
---|
[992] | 73 | done
|
---|
| 74 |
|
---|
| 75 | clean:
|
---|
| 76 | for subdir in $(INSTALLDIRS) $(OTHERDIRS); do \
|
---|
| 77 | echo cleaning $@ in $$subdir; \
|
---|
[555] | 78 | (cd $$subdir && $(MAKE) clean) || exit 1; \
|
---|
| 79 | done
|
---|
| 80 |
|
---|
[691] | 81 | # For an explanation of the following Makefile rules, see node
|
---|
| 82 | # `Automatic Remaking' in GNU Autoconf documentation.
|
---|
| 83 | Makefile: Makefile.in config.status
|
---|
| 84 | CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
---|
| 85 | config.status: configure
|
---|
| 86 | ./config.status --recheck
|
---|
| 87 | configure: configure.in aclocal.m4
|
---|
| 88 | cd $(srcdir) && autoconf
|
---|
[555] | 89 |
|
---|
[691] | 90 | config.h: stamp-h
|
---|
| 91 | stamp-h: config.h.in config.status
|
---|
| 92 | CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
|
---|
| 93 | config.h.in: stamp-h.in
|
---|
| 94 | stamp-h.in: configure.in aclocal.m4 acconfig.h
|
---|
| 95 | cd $(srcdir) && autoheader
|
---|
| 96 | $(TOUCH) $(srcdir)/stamp-h.in
|
---|
[555] | 97 |
|
---|
[691] | 98 |
|
---|
| 99 |
|
---|