##--------------------------------------------------------------------------## ## File: ## $Id: dev.mk,v 1.1 2007/02/22 21:07:02 ehood Exp $ ## Description: ## Development makefile. ##--------------------------------------------------------------------------## ## Copyright (C) 2007 Earl Hood ## ## This program 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. ## ## This program 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 this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA ##--------------------------------------------------------------------------## include vars.mk DIST_BUNDLE = mharc-$(_RELEASE_VERSION).tar # List of files/dirs to be included in distribtion bundle # NOTE: The leading '.' is important. DIST_FILES = \ ./README \ ./INSTALL \ ./NEWS \ ./COPYING \ ./TODO \ ./install.pl \ ./doc \ ./bin \ ./cgi-bin \ ./etc \ ./html/.PNM* \ ./html/stylesheet.css* \ ./lib \ ./Makefile \ ./vars.mk \ ./dev.mk \ # End DIST_FILES # List of files/dirs to explicitly exclude from distribtion bundle # NOTE: The leading '.' is important. DIST_EXC_FILES = \ ./etc/release-mharc \ # End DIST_EXC_FILES TAR_EXC_FILE = dist/.dist-exclude PERL_PRGS = $(PRGS) DEV_MK = dev.mk default: syntax_check release: syntax_check dist dist: _FORCE @$(RM) -rf dist @$(MKDIR) -p dist/mharc @$(FIND) . -name 'CVS' -print > $(TAR_EXC_FILE) @$(FIND) . -name '.*.sw*' -print >> $(TAR_EXC_FILE) @for i in $(DIST_EXC_FILES); do \ echo $$i >> $(TAR_EXC_FILE); \ done @$(TOUCH) INSTALL @$(TAR) -c \ -X $(TAR_EXC_FILE) \ -f - $(DIST_FILES) | (cd dist/mharc; tar xfp -) @(cd dist/mharc && $(MAKE) -f $(DEV_MK) distclean) @(cd dist/mharc && $(MAKE) -f $(DEV_MK) doc) @(cd dist/mharc && $(MAKE) -f $(DEV_MK) doc_pod) @(cd dist/mharc && echo "$(_RELEASE_VERSION)" > VERSION) @$(MV) dist/mharc dist/mharc-$(_RELEASE_VERSION) @(cd dist && $(TAR) cvf $(DIST_BUNDLE) mharc-$(_RELEASE_VERSION)) @(cd dist && $(GZIP) $(DIST_BUNDLE)) syntax_check: _FORCE @for i in $(PERL_PRGS); do \ echo "Checking $$i syntax..."; \ $(PERL) -cw $$i; \ done # doc_pod listed twice to resolve xrefs doc: doc_pod doc_file doc_install doc_pod: _FORCE -@mkdir -p ./doc/bin ./doc/lib ./doc/file @for i in $(PRGS); do \ echo "processing $$i..." ; \ pod2html --header --infile=$$i \ --htmlroot=.. \ --podroot=./doc \ --podpath='bin:lib' \ --outfile=./doc/bin/`basename $$i`.html ; \ done @for i in `find ./lib/MHArc -name '*.pm' -print`; do \ echo "processing $$i..." ; \ pod2html --header \ --infile=$$i \ --htmlroot=.. \ --podroot=./doc \ --podpath='bin:lib' \ --outfile=./doc/lib/MHArc::`basename $$i`.html ; \ done @$(RM) -f pod2htm*.x~~ doc_file: _FORCE $(CP) -f Makefile ./doc/file/Makefile.txt $(CP) -f dev.mk ./doc/file/dev.mk.txt $(CP) -f vars.mk ./doc/file/vars.mk.txt $(CP) -f ./lib/default.mrc.in.dist ./doc/file/default.mrc.txt $(CP) -f ./lib/common.mrc.in.dist ./doc/file/common.mrc.txt $(CP) -f ./lib/config.sh.dist ./doc/file/config.sh.txt $(CP) -f ./lib/lists.def.dist ./doc/file/lists.def.txt $(CP) -f ./etc/apache.conf.in.dist ./doc/file/apache.conf.txt $(CP) -f ./etc/crontab.in.dist ./doc/file/crontab.txt $(CP) -f ./etc/.htaccess.in.dist ./doc/file/htaccess.txt doc_install: w3m -dump -cols 76 ./doc/install.html > INSTALL distclean: clean $(APPLY_CONFIG) -distclean -verbose $(RM) -f $(CONFIG_SH) $(CONFIG_SH).cache.pl $(LIST_DEF) VERSION INSTALL $(RM) -rf ./dist ./doc/bin ./doc/lib ./doc/file clean: _FORCE $(RM) -f $(PROCMAIL_RC) $(APPLY_CONFIG) -clean -verbose # Dummy target to force building of other targets _FORCE: