# Master Makefile for the man-db package. # # Copyright (C) 1994, 1995 Graeme Wilford. # Copyright (C) 2001, 2002, 2003 Colin Watson. # # This file is part of man-db. # # man-db is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # man-db is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with man-db; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Sat Aug 6 15:46:44 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk): #------------------------------------------------------------------------# # You should not need to edit this file at all. All user options can now # # be passed via --enable-?, --disable-? or --with-? options to # # ./configure. # # # # `./configure --help' shows current options available # # # # system specific definitions are now in include/Defines. # # path definitions are in include/manconfig.h # # compression related definitions are in include/comp_src.h # # # # Make targets are: # # # # all install uninstall mostlyclean clean distclean realclean TAGS ID # # FILES lib src man intl libdb update RCS dist # #------------------------------------------------------------------------# srcdir = @srcdir@ libdir = @libdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ USE_NLS = @USE_NLS@ # GNUmakefile and include/Defines are automatic targets, don't add below. INCLUDES := config.h $(addprefix include/, manconfig.h comp_src.h) CONF = src/man_db.conf EVERYTHING = intl lib libdb src man po ALL = intl lib libdb src man po INSTALL = src man intl po include include/Defines export DESTDIR .PHONY: $(DEFAULT_TARGETS) $(EVERYTHING) dist ID \ $(addprefix __, $(DEFAULT_TARGETS)) update default RCS \ check deroff ifneq ($(USE_NLS),yes) ALL = lib libdb src man INSTALL = src man endif # USE_NLS != yes all: $(ALL) $(EVERYTHING): $(INCLUDES) $(CONF) $(MAKE) -C $@ $(targets) # Automatic regeneration targets $(srcdir)/configure: configure.ac aclocal.m4 -cd $(srcdir) && autoconf $(srcdir)/config.h.in: stamp-h.in $(srcdir)/stamp-h.in: configure.ac aclocal.m4 -cd $(srcdir) && autoheader && echo timestamp > stamp-h.in # Use CONFIG_FILES= CONFIG_HEADERS= to force config.status to only # re-create the relevant config file. config.h: stamp-h stamp-h: $(srcdir)/config.h.in config.status CONFIG_FILES= ./config.status echo timestamp > stamp-h config.status: $(srcdir)/configure ./config.status --recheck # Allow sub-Makefiles to request update %: %.in config.status CONFIG_HEADERS= CONFIG_FILES=$@ ./config.status # The following 3 rules must be explicit as using a pattern match rule would # pick up config.h as a target which would be wrong. BUILD.in = CONFIG_HEADERS= CONFIG_FILES=$@ ./config.status include/manconfig.h: include/manconfig.h.in config.status $(BUILD.in) include/comp_src.h: include/comp_src.h.in config.status $(BUILD.in) include/Defines: include/Defines.in config.status $(BUILD.in) src/man_db.conf: src/man_db.conf.in config.status $(BUILD.in) # Special targets ID: mkid $(foreach dir, . $(EVERYTHING), \ $(srcdir)/$(dir)/*.[chl] $(srcdir)/$(dir)/Makefile.in) # Just make sure that all configure created files are up to date update: $(INCLUDES) $(CONF) $(addsuffix /Makefile, $(EVERYTHING)) # testsuite doesn't exist testsuite: @echo " " @echo "The man-db testsuite was not found. To perform a check of the installed" @echo "programs, you must have the man-db testsuite package and DejaGNU, both" @echo "available separately." @echo " " @exit 1 # deRoff doesn't exist deRoff: @echo " " @echo "deroff is not available as this time." @echo " " @exit 1 # Special loop-back root directory targets: don't invoke directly __mostlyclean: rm -f core *~ docs/*~ include/*~ __clean: __mostlyclean rm -f FILES __distclean: __clean rm -f $(INCLUDES) include/Defines GNUmakefile makefile rm -f include/Defines.old config.status config.cache config.log stamp-h rm -rf autom4te.cache rm -f po/Makevars.template __realclean: __distclean rm -f configure tags ID __TAGS: $(MKTAGS) $(srcdir)/*.h include/*.h # Normal targets and dependencies. # If the make variable clean is set to yes, no dependencies are re-created install: $(INCLUDES) $(CONF) install uninstall: for i in $(INSTALL); do $(MAKE) prefix=$(prefix) -C $$i $@; done TAGS realclean distclean mostlyclean clean: for i in $(EVERYTHING); do $(MAKE) prefix=$(prefix) -C $$i $@ clean=yes; done $(MAKE) __$@ check: testsuite testsuite/Makefile $(MAKE) -C testsuite deroff: deRoff deRoff/Makefile $(MAKE) -C deRoff FILES: echo $(FILES) | tr ' ' '\n' > FILES ifeq ($(srcdir),.) # Sorry folks, can only make a dist from the $(srcdir) # The files in the distribution _subdirs = $(EVERYTHING) tools docs include manual m4 _all = */README _root = ABOUT-NLS README configure configure.ac *.m4 *.in man-db.* _docs = INSTALL.* COPYING* ChangeLog HACKING NEWS TODO manpage.example* _include = *.in _lib = Makefile.in *.[ch] _libdb = Makefile.in *.[ch] _m4 = *.m4 _man = Makefile.in man?/*.man? */man?/*.man? THANKS _manual = Makefile *.me _src = Makefile.in README.lexgrog README.zsoelim \ *.[chl] *.l-* lexgrog.l.new man_db.conf.in _tools = chconfig checkman config.* install-sh \ mandb_fmt-script mkcatdirs mkinstalldirs FILES = $(_root) $(_all) \ $(foreach _subdir, $(_subdirs), \ $(addprefix $(_subdir)/, $(_$(_subdir)))) message = release $(version), date $(date) nls_man = de_DE.88591 es_ES.88591 fr_FR.88591 it_IT.88591 ja_JP.eucJP man_db := man-db-$(version) # Ensure the flex C files are current dist: update $(MAKE) -C src lexgrog.c zsoelim.c rm -fr $(man_db) rm -f $(man_db).tar.gz mkdir $(man_db) mkdir $(addprefix $(man_db)/, $(_subdirs)) mkdir $(addprefix $(man_db)/man/, $(nls_man)) mkdir $(addprefix $(man_db)/man/, \ $(foreach dir, . $(nls_man), \ $(dir)/man1 $(dir)/man5 $(dir)/man8)) for file in $(FILES); do \ cp -p $(srcdir)/$$file $(man_db)/$$file; \ done $(MAKE) -C intl dist # Maintainers may wish to run 'make -C po update-po' beforehand. # This is not done automatically, since the .po files are stored # in revision control. $(MAKE) -C po man-db.pot $(MAKE) -C po update-gmo $(MAKE) -C po dist2 chmod -R a+rX $(man_db) tar cvf - $(man_db) | gzip -9 > $(man_db).tar.gz rm -fr $(man_db) endif