]> git.imager.perl.org - bse.git/blob - Makefile
bump to 0.15_33
[bse.git] / Makefile
1 VERSION=0.15_33
2 DISTNAME=bse-$(VERSION)
3 DISTBUILD=$(DISTNAME)
4 DISTTAR=../$(DISTNAME).tar
5 DISTTGZ=$(DISTTAR).gz
6 WEBBASE=/home/httpd/html/bse
7
8 help:
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
14
15 # this target needs to be modified so that the output directory includes
16 # the release number
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 . _`
22
23 # make sure everything is committed
24 cleantree:
25         if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \
26           then echo '***' The debugger is still enabled ; \
27           exit 1; \
28         fi
29         if cvs status 2>/dev/null | grep -q '^\?\|Locally Modified' ; \
30           then echo '***' The tree has modified or unadded files ; \
31           exit 1 ; \
32         fi
33
34 archive: $(DISTTGZ)
35
36 $(DISTTGZ): distdir
37         if [ -e $(DISTTGZ) ] ; \
38           then echo $(DISTTGZ) already exists ; \
39                exit 1 ; \
40         fi
41         tar cf $(DISTTAR) $(DISTBUILD)
42         -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
43         gzip $(DISTTAR)
44
45 #       tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
46
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
52
53 clean:
54         -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
55         -cd site/htdocs/images ; \
56         for i in *.gif ; do \
57           if [ $$i != trans_pixel.gif ] ; then \
58             rm $$i ; \
59           fi ; \
60         done
61         -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
62         -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
63
64 docs: INSTALL.txt INSTALL.html otherdocs
65
66 INSTALL.txt: INSTALL.pod
67         pod2text <INSTALL.pod >INSTALL.txt
68
69 INSTALL.html: INSTALL.pod
70         pod2html --infile=INSTALL.pod --outfile=INSTALL.html
71         -rm pod2html-dircache pod2html-itemcache
72
73 otherdocs:
74         cd site/docs ; make all
75
76 dbinfo: site/util/mysql.str
77
78 site/util/mysql.str: schema/bse.sql
79         perl schema/mysql_build.pl >site/util/mysql.str
80
81 version: site/cgi-bin/modules/BSE/Version.pm
82
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
92
93 # this is very rough
94 testinst: distdir
95         perl localinst.perl $(DISTBUILD)
96         perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
97
98 testfiles: distdir
99         perl localinst.perl $(DISTBUILD) leavedb
100         perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
101
102 test: testinst
103         perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests glob q!t/*.t!'
104
105 manicheck:
106         perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
107
108 filecheck:
109         perl -MExtUtils::Manifest=filecheck -e 'filecheck()'