0.12_23 commit
[bse.git] / Makefile
CommitLineData
918735d1 1VERSION=0.12_23
41b9d8ec
TC
2DISTNAME=bse-$(VERSION)
3DISTBUILD=$(DISTNAME)
4DISTTAR=../$(DISTNAME).tar
5DISTTGZ=$(DISTTAR).gz
957a90ca 6WEBBASE=/home/httpd/html/bse
41b9d8ec
TC
7
8help:
9 @echo make dist - build the tar.gz file
10 @echo make clean - delete generated files
6e73144d
TC
11 @echo make distdir - build distribution directory
12 @echo make docs - build documentation
41b9d8ec
TC
13
14# this target needs to be modified so that the output directory includes
15# the release number
957a90ca 16dist: cleantree $(DISTTGZ)
227b99dc
TC
17 cp $(DISTTGZ) $(WEBBASE)/dists/
18 cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html
19 cp site/docs/*.html $(WEBBASE)/docs
4a570da2 20 cvs tag r`echo $(VERSION) | tr . _`
957a90ca
TC
21
22# make sure everything is committed
23cleantree:
84cb877f 24 if cvs status 2>/dev/null | grep -q '^\?\|Locally Modified' ; \
f6a52649 25 then echo '***' The tree has modified or unadded files ; \
957a90ca
TC
26 exit 1 ; \
27 fi
41b9d8ec
TC
28
29$(DISTTGZ): distdir
30 if [ -e $(DISTTGZ) ] ; \
31 then echo $(DISTTGZ) already exists ; \
32 exit 1 ; \
33 fi
34 tar cf $(DISTTAR) $(DISTBUILD)
09a131dd 35 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec
TC
36 gzip $(DISTTAR)
37
38# tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
39
d2730773 40distdir: docs dbinfo version
09a131dd 41 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec 42 perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
6e73144d
TC
43 mkdir $(DISTBUILD)/site/htdocs/shop
44 find $(DISTBUILD) -type f | xargs chmod u+w
41b9d8ec
TC
45
46clean:
09a131dd 47 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
41b9d8ec
TC
48 -cd site/htdocs/images ; \
49 for i in *.gif ; do \
50 if [ $$i != trans_pixel.gif ] ; then \
51 rm $$i ; \
52 fi ; \
53 done
09a131dd
TC
54 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
55 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec 56
6e73144d 57docs: INSTALL.txt INSTALL.html otherdocs
41b9d8ec 58
6e73144d
TC
59INSTALL.txt: INSTALL.pod
60 pod2text <INSTALL.pod >INSTALL.txt
41b9d8ec
TC
61
62INSTALL.html: INSTALL.pod
63 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
64 -rm pod2html-dircache pod2html-itemcache
65
66otherdocs:
67 cd site/docs ; make all
6e73144d 68
b19047a6
TC
69dbinfo: site/util/mysql.str
70
71site/util/mysql.str: schema/bse.sql
72 perl schema/mysql_build.pl >site/util/mysql.str
73
d2730773
TC
74version: site/cgi-bin/modules/BSE/Version.pm
75
76site/cgi-bin/modules/BSE/Version.pm: Makefile
77 echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
78 echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
79 echo >>site/cgi-bin/modules/BSE/Version.pm
80 echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
81 echo >>site/cgi-bin/modules/BSE/Version.pm
82 echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
83 echo >>site/cgi-bin/modules/BSE/Version.pm
84 echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
85
6e73144d
TC
86# this is very rough
87testinst: distdir
88 perl localinst.perl $(DISTBUILD)
09a131dd 89 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
34bc5961
TC
90
91testfiles: distdir
92 perl localinst.perl $(DISTBUILD) leavedb
09a131dd
TC
93 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
94
41fd1a57
TC
95test: testinst
96 perl -MTest::Harness=runtests -It -e 'runtests glob q!t/*.t!'
35c0719f
TC
97
98manicheck:
99 perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
100
101filecheck:
102 perl -MExtUtils::Manifest=filecheck -e 'filecheck()'