0.11_09 commit
[bse.git] / Makefile
CommitLineData
3bc94f98 1VERSION=0.11_09
41b9d8ec
TC
2DISTNAME=bse-$(VERSION)
3DISTBUILD=$(DISTNAME)
4DISTTAR=../$(DISTNAME).tar
5DISTTGZ=$(DISTTAR).gz
6
7help:
8 @echo make dist - build the tar.gz file
9 @echo make clean - delete generated files
6e73144d
TC
10 @echo make distdir - build distribution directory
11 @echo make docs - build documentation
41b9d8ec
TC
12
13# this target needs to be modified so that the output directory includes
14# the release number
15dist: $(DISTTGZ)
16
17$(DISTTGZ): distdir
18 if [ -e $(DISTTGZ) ] ; \
19 then echo $(DISTTGZ) already exists ; \
20 exit 1 ; \
21 fi
22 tar cf $(DISTTAR) $(DISTBUILD)
09a131dd 23 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec
TC
24 gzip $(DISTTAR)
25
26# tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
27
b19047a6 28distdir: docs dbinfo
09a131dd 29 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec 30 perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
6e73144d
TC
31 mkdir $(DISTBUILD)/site/htdocs/shop
32 find $(DISTBUILD) -type f | xargs chmod u+w
41b9d8ec
TC
33
34clean:
09a131dd 35 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
41b9d8ec
TC
36 -cd site/htdocs/images ; \
37 for i in *.gif ; do \
38 if [ $$i != trans_pixel.gif ] ; then \
39 rm $$i ; \
40 fi ; \
41 done
09a131dd
TC
42 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
43 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec 44
6e73144d 45docs: INSTALL.txt INSTALL.html otherdocs
41b9d8ec 46
6e73144d
TC
47INSTALL.txt: INSTALL.pod
48 pod2text <INSTALL.pod >INSTALL.txt
41b9d8ec
TC
49
50INSTALL.html: INSTALL.pod
51 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
52 -rm pod2html-dircache pod2html-itemcache
53
54otherdocs:
55 cd site/docs ; make all
6e73144d 56
b19047a6
TC
57dbinfo: site/util/mysql.str
58
59site/util/mysql.str: schema/bse.sql
60 perl schema/mysql_build.pl >site/util/mysql.str
61
6e73144d
TC
62# this is very rough
63testinst: distdir
64 perl localinst.perl $(DISTBUILD)
09a131dd 65 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
34bc5961
TC
66
67testfiles: distdir
68 perl localinst.perl $(DISTBUILD) leavedb
09a131dd
TC
69 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
70
41fd1a57
TC
71test: testinst
72 perl -MTest::Harness=runtests -It -e 'runtests glob q!t/*.t!'