[13737] | 1 | # Main Makefile for MG
|
---|
[3745] | 2 | # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
---|
| 3 |
|
---|
| 4 | # This program is free software; you can redistribute it and/or modify
|
---|
| 5 | # it under the terms of the GNU General Public License as published by
|
---|
| 6 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
| 7 | # any later version.
|
---|
| 8 |
|
---|
| 9 | # This program is distributed in the hope that it will be useful,
|
---|
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 12 | # GNU General Public License for more details.
|
---|
| 13 |
|
---|
| 14 | # You should have received a copy of the GNU General Public License
|
---|
| 15 | # along with this program; if not, write to the Free Software
|
---|
| 16 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 17 |
|
---|
| 18 | PACKAGE = @PACKAGE@
|
---|
| 19 | VERSION = @VERSION@
|
---|
| 20 |
|
---|
| 21 | @SET_MAKE@
|
---|
| 22 | SHELL = /bin/sh
|
---|
| 23 | VPATH = @srcdir@
|
---|
| 24 | exec_prefix = @exec_prefix@
|
---|
| 25 | prefix = @prefix@
|
---|
| 26 | srcdir = @srcdir@
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | CC = @CC@
|
---|
[10921] | 30 | CFLAGS = @CFLAGS@ -fpic
|
---|
[3745] | 31 | INSTALL = @INSTALL@
|
---|
| 32 | INSTALL_DATA = @INSTALL_DATA@
|
---|
| 33 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
| 34 | LDFLAGS = @LDFLAGS@
|
---|
| 35 | LIBS = @LIBS@
|
---|
| 36 | TOUCH = echo timestamp >
|
---|
| 37 |
|
---|
| 38 | bindir = $(exec_prefix)/bin
|
---|
| 39 | infodir = $(prefix)/info
|
---|
| 40 | libexecdir = $(exec_prefix)/libexec
|
---|
| 41 |
|
---|
| 42 | MDEFINES =
|
---|
| 43 | #CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
|
---|
| 44 | #prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
|
---|
| 45 | #bindir='$(bindir)' libexecdir='$(libexecdir)' \
|
---|
| 46 | #infodir='$(infodir)' infodir='$(infodir)' libexecdir='$(libexecdir)'
|
---|
| 47 |
|
---|
[13778] | 48 | #SUBDIRS = lib src/text src/images src/scripts
|
---|
| 49 | SUBDIRS = lib src/text
|
---|
[13788] | 50 | JAVADIRS = java/org/greenstone/mg
|
---|
| 51 | JNIDIRS = jni
|
---|
[3745] | 52 | .SUFFIXES:
|
---|
| 53 |
|
---|
| 54 | all install uninstall execinstall execuninstall maninstall manuninstall: config.h
|
---|
[13788] | 55 | for subdir in $(SUBDIRS) $(JAVADIRS) $(JNIDIRS); do \
|
---|
[3745] | 56 | echo making $@ in $$subdir; \
|
---|
| 57 | (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
| 58 | done
|
---|
| 59 |
|
---|
[13716] | 60 | nojava:
|
---|
| 61 | for subdir in $(SUBDIRS); do \
|
---|
| 62 | echo making $@ in $$subdir; \
|
---|
| 63 | (cd $$subdir && $(MAKE) $(MDEFINES) all) || exit 1; \
|
---|
| 64 | done
|
---|
[13502] | 65 |
|
---|
[13716] | 66 | install-nojava:
|
---|
| 67 | for subdir in $(SUBDIRS); do \
|
---|
| 68 | echo making $@ in $$subdir; \
|
---|
| 69 | (cd $$subdir && $(MAKE) $(MDEFINES) install) || exit 1; \
|
---|
| 70 | done
|
---|
[13502] | 71 |
|
---|
[13788] | 72 | javaonly:
|
---|
| 73 | for subdir in $(JAVADIRS); do \
|
---|
| 74 | echo making $@ in $$subdir; \
|
---|
| 75 | (cd $$subdir && $(MAKE) $(MDEFINES) all) || exit 1; \
|
---|
| 76 | done
|
---|
| 77 |
|
---|
| 78 | install-javaonly:
|
---|
| 79 | for subdir in $(JAVADIRS); do \
|
---|
| 80 | echo making $@ in $$subdir; \
|
---|
| 81 | (cd $$subdir && $(MAKE) $(MDEFINES) install) || exit 1; \
|
---|
| 82 | done
|
---|
| 83 |
|
---|
| 84 |
|
---|
[3745] | 85 | check: all
|
---|
| 86 | echo making $@ in ./test directory
|
---|
| 87 | (cd ./test && $(MAKE) all) || exit 1
|
---|
| 88 | ./test/testmg `pwd`
|
---|
| 89 |
|
---|
| 90 | mostlyclean: mostlyclean-recursive mostlyclean-local
|
---|
| 91 |
|
---|
| 92 | clean: clean-recursive clean-local
|
---|
| 93 |
|
---|
[7732] | 94 | distclean: distclean-recursive distclean-local
|
---|
[3745] | 95 |
|
---|
| 96 | maintainer-clean: maintainer-clean-recursive maintainer-clean-local
|
---|
| 97 | rm -f config.status
|
---|
| 98 |
|
---|
[7732] | 99 | mostlyclean-recursive clean-recursive distclean-recursive maintainer-clean-recursive:
|
---|
[13802] | 100 | for subdir in $(SUBDIRS) $(JAVADIRS) $(JNIDIRS); do \
|
---|
[3745] | 101 | target=`echo $@ | sed 's/-recursive//'`; \
|
---|
| 102 | echo making $$target in $$subdir; \
|
---|
| 103 | (cd $$subdir && $(MAKE) $$target) || exit 1; \
|
---|
| 104 | done
|
---|
| 105 |
|
---|
| 106 | mostlyclean-local:
|
---|
| 107 |
|
---|
| 108 | clean-local: mostlyclean-local
|
---|
| 109 |
|
---|
| 110 | distclean-local: clean-local
|
---|
[7732] | 111 | rm -f Makefile stamp-h config.status config.h config.log
|
---|
[3745] | 112 |
|
---|
| 113 | maintainer-clean-local: distclean-local
|
---|
| 114 | @echo "This command is intended only for maintainers to use;"
|
---|
| 115 | @echo "rebuilding the deleted files may require special tools."
|
---|
| 116 |
|
---|
| 117 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
| 118 |
|
---|
| 119 | distdir = $(PACKAGE)-$(VERSION)
|
---|
| 120 |
|
---|
| 121 | distname = $(distdir)
|
---|
| 122 |
|
---|
| 123 | DISTFILES = \
|
---|
| 124 | INSTALL.mg INSTALL README README.port COPYING MODIFICATIONS about_mg.html \
|
---|
| 125 | Makefile.in acconfig.h aclocal.m4 configure.in install-sh mkinstalldirs \
|
---|
| 126 | config.guess config.sub \
|
---|
| 127 | config.h.in configure stamp-h.in sysfuncs.h
|
---|
| 128 |
|
---|
| 129 | dist: $(DISTFILES)
|
---|
| 130 | #-----------------------------------------------------------------
|
---|
| 131 | #create distribution directory
|
---|
| 132 | -rm -rf $(distdir)
|
---|
| 133 | mkdir $(distdir)
|
---|
| 134 | #
|
---|
| 135 | #link in local distribution files
|
---|
| 136 | ln $(DISTFILES) $(distdir)
|
---|
| 137 | #
|
---|
| 138 | #link in SampleData
|
---|
| 139 | mkdir $(distdir)/SampleData
|
---|
| 140 | (cd SampleData; $(MAKE) "distdir=../$(distdir)/SampleData" dist)
|
---|
| 141 | # link in davinci stuff
|
---|
| 142 | mkdir $(distdir)/SampleData/davinci
|
---|
| 143 | (cd SampleData/davinci; \
|
---|
| 144 | $(MAKE) "distdir=../../$(distdir)/SampleData/davinci" dist)
|
---|
| 145 | # link in bible stuff
|
---|
| 146 | mkdir $(distdir)/SampleData/bible
|
---|
| 147 | (cd SampleData/bible; \
|
---|
| 148 | $(MAKE) "distdir=../../$(distdir)/SampleData/bible" dist)
|
---|
| 149 | #
|
---|
| 150 | #link in tests
|
---|
| 151 | mkdir $(distdir)/test
|
---|
| 152 | (cd test; $(MAKE) "distdir=../$(distdir)/test" dist)
|
---|
| 153 | #
|
---|
| 154 | #link in docs directory
|
---|
| 155 | mkdir $(distdir)/docs
|
---|
| 156 | (cd docs; $(MAKE) "distdir=../$(distdir)/docs" dist)
|
---|
| 157 | #
|
---|
| 158 | #link in lib directory
|
---|
| 159 | mkdir $(distdir)/lib
|
---|
| 160 | (cd lib; $(MAKE) "distdir=../$(distdir)/lib" dist)
|
---|
| 161 | #
|
---|
| 162 | #link in src distribution files
|
---|
| 163 | mkdir $(distdir)/src
|
---|
| 164 | for dir in src/text src/images src/scripts; do \
|
---|
| 165 | echo makeing $@ in $$dir ; \
|
---|
| 166 | mkdir $(distdir)/$$dir; \
|
---|
| 167 | (cd $$dir; $(MAKE) "distdir=../../$(distdir)/$$dir" $@) ; \
|
---|
| 168 | done
|
---|
| 169 | #
|
---|
| 170 | # archive and compress
|
---|
| 171 | tar -chf - $(distdir) | gzip -9 > $(distname).tar.gz
|
---|
| 172 | tar -chf - $(distdir) | compress > $(distname).tar.Z
|
---|
| 173 | #
|
---|
| 174 | # cleanup
|
---|
| 175 | rm -rf $(distdir)
|
---|
| 176 | #-----------------------------------------------------------------
|
---|
| 177 |
|
---|
| 178 | # Tell versions [3.59,3.63) of GNU make not to export all variables.
|
---|
| 179 | # Otherwise a system limit (for SysV at least) may be exceeded.
|
---|
| 180 | .NOEXPORT:
|
---|