]> git.imager.perl.org - bse.git/blame - Makefile
simple module load test code
[bse.git] / Makefile
CommitLineData
913bdd17 1VERSION=0.18
41b9d8ec
TC
2DISTNAME=bse-$(VERSION)
3DISTBUILD=$(DISTNAME)
4DISTTAR=../$(DISTNAME).tar
5DISTTGZ=$(DISTTAR).gz
957a90ca 6WEBBASE=/home/httpd/html/bse
41b9d8ec
TC
7
8help:
8b0b2f34 9 @echo make dist - build the tar.gz file and copy to distribution directory
12bcb7ac 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
a47e539f 14 @echo make testup - upgrade an installation
41b9d8ec
TC
15
16# this target needs to be modified so that the output directory includes
17# the release number
957a90ca 18dist: cleantree $(DISTTGZ)
227b99dc
TC
19 cp $(DISTTGZ) $(WEBBASE)/dists/
20 cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html
21 cp site/docs/*.html $(WEBBASE)/docs
5af99440 22 svn cp . http://svn.develop-help.com/devsvn/bse/tags/bse-$(VERSION)
957a90ca
TC
23
24# make sure everything is committed
25cleantree:
85802bd5
TC
26 if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \
27 then echo '***' The debugger is still enabled ; \
28 exit 1; \
29 fi
5af99440 30 test -z "`svn status`" || ( echo "Uncommitted files in the tree"; exit 1 )
41b9d8ec 31
8b0b2f34
TC
32archive: $(DISTTGZ)
33
41b9d8ec
TC
34$(DISTTGZ): distdir
35 if [ -e $(DISTTGZ) ] ; \
36 then echo $(DISTTGZ) already exists ; \
37 exit 1 ; \
38 fi
39 tar cf $(DISTTAR) $(DISTBUILD)
09a131dd 40 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec
TC
41 gzip $(DISTTAR)
42
43# tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
44
e9c9a2be
TC
45# recent ExtUtils::Manifest don't copy the executable bit, fix that here
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
e9c9a2be 52 for i in `cat MANIFEST` ; do if [ -x $$i ] ; then chmod a+x $(DISTBUILD)/$$i ; fi ; done
41b9d8ec
TC
53
54clean:
09a131dd 55 -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
41b9d8ec
TC
56 -cd site/htdocs/images ; \
57 for i in *.gif ; do \
58 if [ $$i != trans_pixel.gif ] ; then \
59 rm $$i ; \
60 fi ; \
61 done
09a131dd
TC
62 -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
63 -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
41b9d8ec 64
6e73144d 65docs: INSTALL.txt INSTALL.html otherdocs
41b9d8ec 66
6e73144d
TC
67INSTALL.txt: INSTALL.pod
68 pod2text <INSTALL.pod >INSTALL.txt
41b9d8ec
TC
69
70INSTALL.html: INSTALL.pod
71 pod2html --infile=INSTALL.pod --outfile=INSTALL.html
72 -rm pod2html-dircache pod2html-itemcache
73
74otherdocs:
75 cd site/docs ; make all
6e73144d 76
b19047a6
TC
77dbinfo: site/util/mysql.str
78
79site/util/mysql.str: schema/bse.sql
80 perl schema/mysql_build.pl >site/util/mysql.str
81
d2730773
TC
82version: site/cgi-bin/modules/BSE/Version.pm
83
84site/cgi-bin/modules/BSE/Version.pm: Makefile
85 echo 'package BSE::Version;' >site/cgi-bin/modules/BSE/Version.pm
86 echo 'use strict;' >>site/cgi-bin/modules/BSE/Version.pm
87 echo >>site/cgi-bin/modules/BSE/Version.pm
88 echo 'my $$VERSION = "$(VERSION)";' >>site/cgi-bin/modules/BSE/Version.pm
89 echo >>site/cgi-bin/modules/BSE/Version.pm
90 echo 'sub version { $$VERSION }' >>site/cgi-bin/modules/BSE/Version.pm
91 echo >>site/cgi-bin/modules/BSE/Version.pm
92 echo '1;' >>site/cgi-bin/modules/BSE/Version.pm
93
7057fbc0
TC
94svnversion:
95 perl site/util/bse_mksvnversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm
96
6e73144d
TC
97# this is very rough
98testinst: distdir
99 perl localinst.perl $(DISTBUILD)
09a131dd 100 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
2076966c 101 cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl loaddata.pl ../data/db
34bc5961 102
a47e539f 103testup: distdir
34bc5961 104 perl localinst.perl $(DISTBUILD) leavedb
09a131dd 105 perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
a47e539f 106 cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl upgrade_mysql.pl -b ; perl loaddata.pl ../data/db
09a131dd 107
87b53bfa
TC
108TEST_FILES=t/*.t
109
110test: testup
111 perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests @ARGV' $(TEST_FILES)
35c0719f
TC
112
113manicheck:
114 perl -MExtUtils::Manifest=manicheck -e 'manicheck()'
115
116filecheck:
117 perl -MExtUtils::Manifest=filecheck -e 'filecheck()'