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 cvs status 2>/dev/null | grep -q '^\?\|Locally Modified' ; \
26 then echo '***' The tree has modified or unadded files ; \
33 if [ -e $(DISTTGZ) ] ; \
34 then echo $(DISTTGZ) already exists ; \
37 tar cf $(DISTTAR) $(DISTBUILD)
38 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41 # tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
43 distdir: docs dbinfo version
44 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
45 perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
46 mkdir $(DISTBUILD)/site/htdocs/shop
47 find $(DISTBUILD) -type f | xargs chmod u+w
50 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
51 -cd site/htdocs/images ; \
53 if [ $$i != trans_pixel.gif ] ; then \
57 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
58 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
60 docs: INSTALL.txt INSTALL.html otherdocs
62 INSTALL.txt: INSTALL.pod
63 pod2text <INSTALL.pod >INSTALL.txt
65 INSTALL.html: INSTALL.pod
66 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
67 -rm pod2html-dircache pod2html-itemcache
70 cd site/docs ; make all
72 dbinfo: site/util/mysql.str
74 site/util/mysql.str: schema/bse.sql
75 perl schema/mysql_build.pl >site/util/mysql.str
77 version: site/cgi-bin/modules/BSE/Version.pm
79 site/cgi-bin/modules/BSE/Version.pm: Makefile
80 echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
81 echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
82 echo >>site/cgi-bin/modules/BSE/Version.pm
83 echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
84 echo >>site/cgi-bin/modules/BSE/Version.pm
85 echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
86 echo >>site/cgi-bin/modules/BSE/Version.pm
87 echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
91 perl localinst.perl $(DISTBUILD)
92 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
95 perl localinst.perl $(DISTBUILD) leavedb
96 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
99 perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests glob q!t/*.t!'
102 perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
105 perl -MExtUtils::Manifest=filecheck -e 'filecheck()'