-VERSION=0.15_56
+VERSION=0.19
DISTNAME=bse-$(VERSION)
DISTBUILD=$(DISTNAME)
DISTTAR=../$(DISTNAME).tar
DISTTGZ=$(DISTTAR).gz
WEBBASE=/home/httpd/html/bse
+MODULES=$(shell grep cgi-bin/.*\.pm MANIFEST | sed -e '/^\#/d' -e 's/[ \t].*// -e /^site\/cgi-bin\/modules\/BSE\/Modules\.pm$/d' )
+
help:
@echo make dist - build the tar.gz file and copy to distribution directory
@echo make 'archive - build the tar.gz (in the parent directory)'
@echo make clean - delete generated files
@echo make distdir - build distribution directory
@echo make docs - build documentation
+ @echo make testup - upgrade an installation
# this target needs to be modified so that the output directory includes
# the release number
cp $(DISTTGZ) $(WEBBASE)/dists/
cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html
cp site/docs/*.html $(WEBBASE)/docs
- svn cp . http://svn.develop-help.com/devsvn/bse/tags/bse-$(VERSION)
+ git tag -m "$(VERSION) release" r$(VERSION)
# make sure everything is committed
cleantree:
then echo '***' The debugger is still enabled ; \
exit 1; \
fi
- test -z "`svn status`" || ( echo "Uncommitted files in the tree"; exit 1 )
+ test -z "`git status -s`" || ( echo "Uncommitted files in the tree"; exit 1 )
archive: $(DISTTGZ)
# recent ExtUtils::Manifest don't copy the executable bit, fix that here
-distdir: docs dbinfo version
+distdir: docs dbinfo version modversion
-perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
mkdir $(DISTBUILD)/site/htdocs/shop
INSTALL.html: INSTALL.pod
pod2html --infile=INSTALL.pod --outfile=INSTALL.html
- -rm pod2html-dircache pod2html-itemcache
+ -rm pod2html-dircache pod2html-itemcache pod2htmd.tmp pod2htmi.tmp
otherdocs:
cd site/docs ; make all
version: site/cgi-bin/modules/BSE/Version.pm
site/cgi-bin/modules/BSE/Version.pm: Makefile
- echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
- echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
- echo >>site/cgi-bin/modules/BSE/Version.pm
- echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
- echo >>site/cgi-bin/modules/BSE/Version.pm
- echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
- echo >>site/cgi-bin/modules/BSE/Version.pm
- echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
-
-svnversion:
- perl site/util/bse_mksvnversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm
+ perl site/util/bse_mkgitversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm
+
+modversion: site/cgi-bin/modules/BSE/Modules.pm
+
+site/cgi-bin/modules/BSE/Modules.pm: $(MODULES) site/util/make_versions.pl
+ perl site/util/make_versions.pl site/cgi-bin/modules/BSE/Modules.pm
# this is very rough
testinst: distdir
perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl loaddata.pl ../data/db
-testfiles: distdir
+testup: checkver distdir
perl localinst.perl $(DISTBUILD) leavedb
perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
- cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl loaddata.pl ../data/db
+ cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl upgrade_mysql.pl -b ; perl loaddata.pl ../data/db
-test: testinst
- perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests glob q!t/*.t!'
+checkver:
+ if [ -d .git ] ; then perl site/util/check_versions.pl ; fi
+
+TEST_FILES=t/*.t
+
+test: testup
+ perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests @ARGV' $(TEST_FILES)
manicheck:
perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
filecheck:
perl -MExtUtils::Manifest=filecheck -e 'filecheck()'
+
+manifest:
+ perl -MExtUtils::Manifest=mkmanifest -e mkmanifest