2 DISTNAME=bse-$(VERSION)
4 DISTTAR=../$(DISTNAME).tar
6 WEBBASE=/home/httpd/html/bse
8 BSEMODULES=site/cgi-bin/modules/BSE/Modules.pm
10 MODULES=$(shell grep cgi-bin/.*\.pm MANIFEST | sed -e '/^\#/d' -e 's/[ \t].*//' -e '/^site\/cgi-bin\/modules\/BSE\/\(Modules\|Version\)\.pm/d' )
11 VERSIONDEPS=$(shell perl site/util/bse_versiondeps.pl MANIFEST)
14 @echo make dist - build the tar.gz file and copy to distribution directory
15 @echo make 'archive - build the tar.gz (in the parent directory)'
16 @echo make clean - delete generated files
17 @echo make distdir - build distribution directory
18 @echo make docs - build documentation
19 @echo make testup - upgrade an installation
21 # this target needs to be modified so that the output directory includes
23 dist: cleantree $(DISTTGZ)
24 cp $(DISTTGZ) $(WEBBASE)/dists/
25 cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html
26 cp site/docs/*.html $(WEBBASE)/docs
27 git tag -m "$(VERSION) release" r$(VERSION)
29 # make sure everything is committed
31 if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \
32 then echo '***' The debugger is still enabled ; \
35 test -z "`git status -s`" || ( echo "Uncommitted files in the tree"; exit 1 )
40 if [ -e $(DISTTGZ) ] ; \
41 then echo $(DISTTGZ) already exists ; \
44 tar cf $(DISTTAR) $(DISTBUILD)
45 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
48 # tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
50 # recent ExtUtils::Manifest don't copy the executable bit, fix that here
52 distdir: docs dbinfo version
53 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
54 perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
55 perl site/util/make_versions.pl $(DISTBUILD)/$(BSEMODULES)
56 mkdir $(DISTBUILD)/site/htdocs/shop
57 find $(DISTBUILD) -type f | xargs chmod u+w
58 for i in `cat MANIFEST` ; do if [ -x $$i ] ; then chmod a+x $(DISTBUILD)/$$i ; fi ; done
61 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
62 -cd site/htdocs/images ; \
64 if [ $$i != trans_pixel.gif ] ; then \
68 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
69 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
71 docs: INSTALL.txt INSTALL.html otherdocs
73 INSTALL.txt: INSTALL.pod
74 pod2text <INSTALL.pod >INSTALL.txt
76 INSTALL.html: INSTALL.pod
77 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
78 -rm pod2html-dircache pod2html-itemcache pod2htmd.tmp pod2htmi.tmp
81 cd site/docs ; make all
83 dbinfo: site/util/mysql.str
85 site/util/mysql.str: schema/bse.sql
86 perl schema/mysql_build.pl >site/util/mysql.str
88 version: site/cgi-bin/modules/BSE/Version.pm
90 site/cgi-bin/modules/BSE/Version.pm: $(VERSIONDEPS)
91 perl site/util/bse_mkgitversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm
93 modversion: $(BSEMODULES)
95 $(BSEMODULES): $(MODULES) site/util/make_versions.pl
96 perl site/util/make_versions.pl $(BSEMODULES)
100 perl localinst.perl $(DISTBUILD)
101 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
102 cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl loaddata.pl ../data/db
104 testup: checkver distdir
105 perl localinst.perl $(DISTBUILD) leavedb
106 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
107 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
110 if [ -d .git ] ; then perl site/util/check_versions.pl ; fi
116 perl '-MTest::Harness=runtests,$$verbose' -Isite/cgi-bin/modules -It -e '$$verbose=$(TEST_VERBOSE); runtests @ARGV' $(TEST_FILES)
119 perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
122 perl -MExtUtils::Manifest=filecheck -e 'filecheck()'
125 perl -MExtUtils::Manifest=mkmanifest -e mkmanifest