2 DISTNAME=bse-$(VERSION)
4 DISTTAR=../$(DISTNAME).tar
6 WEBBASE=/home/httpd/html/bse
9 @echo make dist - build the tar.gz file and copy to distribution directory
10 @echo make 'archive - build the tar.gz (in the parent directory)'
11 @echo make clean - delete generated files
12 @echo make distdir - build distribution directory
13 @echo make docs - build documentation
15 # this target needs to be modified so that the output directory includes
17 dist: cleantree $(DISTTGZ)
18 cp $(DISTTGZ) $(WEBBASE)/dists/
19 cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html
20 cp site/docs/*.html $(WEBBASE)/docs
21 cvs tag r`echo $(VERSION) | tr . _`
23 # make sure everything is committed
25 if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \
26 then echo '***' The debugger is still enabled ; \
29 if cvs status 2>/dev/null | grep -q '^\?\|Locally Modified' ; \
30 then echo '***' The tree has modified or unadded files ; \
37 if [ -e $(DISTTGZ) ] ; \
38 then echo $(DISTTGZ) already exists ; \
41 tar cf $(DISTTAR) $(DISTBUILD)
42 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
45 # tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
47 distdir: docs dbinfo version
48 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
49 perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
50 mkdir $(DISTBUILD)/site/htdocs/shop
51 find $(DISTBUILD) -type f | xargs chmod u+w
54 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
55 -cd site/htdocs/images ; \
57 if [ $$i != trans_pixel.gif ] ; then \
61 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
62 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
64 docs: INSTALL.txt INSTALL.html otherdocs
66 INSTALL.txt: INSTALL.pod
67 pod2text <INSTALL.pod >INSTALL.txt
69 INSTALL.html: INSTALL.pod
70 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
71 -rm pod2html-dircache pod2html-itemcache
74 cd site/docs ; make all
76 dbinfo: site/util/mysql.str
78 site/util/mysql.str: schema/bse.sql
79 perl schema/mysql_build.pl >site/util/mysql.str
81 version: site/cgi-bin/modules/BSE/Version.pm
83 site/cgi-bin/modules/BSE/Version.pm: Makefile
84 echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
85 echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
86 echo >>site/cgi-bin/modules/BSE/Version.pm
87 echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
88 echo >>site/cgi-bin/modules/BSE/Version.pm
89 echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
90 echo >>site/cgi-bin/modules/BSE/Version.pm
91 echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
95 perl localinst.perl $(DISTBUILD)
96 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
99 perl localinst.perl $(DISTBUILD) leavedb
100 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
103 perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests glob q!t/*.t!'
106 perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
109 perl -MExtUtils::Manifest=filecheck -e 'filecheck()'