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