Commit | Line | Data |
---|---|---|
cb7fd78d | 1 | VERSION=0.19 |
41b9d8ec TC |
2 | DISTNAME=bse-$(VERSION) |
3 | DISTBUILD=$(DISTNAME) | |
4 | DISTTAR=../$(DISTNAME).tar | |
5 | DISTTGZ=$(DISTTAR).gz | |
957a90ca | 6 | WEBBASE=/home/httpd/html/bse |
41b9d8ec | 7 | |
8bf647a0 TC |
8 | BSEMODULES=site/cgi-bin/modules/BSE/Modules.pm |
9 | ||
ed1ff43e TC |
10 | MODULES=$(shell grep cgi-bin/.*\.pm MANIFEST | sed -e '/^\#/d' -e 's/[ \t].*//' -e '/^site\/cgi-bin\/modules\/BSE\/\(Modules\|Version\)\.pm/d' ) |
11 | VERSIONDEPS=$(shell perl site/util/bse_versiondeps.pl MANIFEST) | |
75b07edf | 12 | |
41b9d8ec | 13 | help: |
8b0b2f34 | 14 | @echo make dist - build the tar.gz file and copy to distribution directory |
12bcb7ac | 15 | @echo make 'archive - build the tar.gz (in the parent directory)' |
41b9d8ec | 16 | @echo make clean - delete generated files |
6e73144d TC |
17 | @echo make distdir - build distribution directory |
18 | @echo make docs - build documentation | |
a47e539f | 19 | @echo make testup - upgrade an installation |
41b9d8ec TC |
20 | |
21 | # this target needs to be modified so that the output directory includes | |
22 | # the release number | |
957a90ca | 23 | dist: cleantree $(DISTTGZ) |
227b99dc TC |
24 | cp $(DISTTGZ) $(WEBBASE)/dists/ |
25 | cp site/docs/bse.html $(WEBBASE)/relnotes/bse-$(VERSION).html | |
26 | cp site/docs/*.html $(WEBBASE)/docs | |
0f35f2b7 | 27 | git tag -m "$(VERSION) release" r$(VERSION) |
957a90ca TC |
28 | |
29 | # make sure everything is committed | |
30 | cleantree: | |
85802bd5 TC |
31 | if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \ |
32 | then echo '***' The debugger is still enabled ; \ | |
33 | exit 1; \ | |
34 | fi | |
0f35f2b7 | 35 | test -z "`git status -s`" || ( echo "Uncommitted files in the tree"; exit 1 ) |
41b9d8ec | 36 | |
8b0b2f34 TC |
37 | archive: $(DISTTGZ) |
38 | ||
41b9d8ec TC |
39 | $(DISTTGZ): distdir |
40 | if [ -e $(DISTTGZ) ] ; \ | |
41 | then echo $(DISTTGZ) already exists ; \ | |
42 | exit 1 ; \ | |
43 | fi | |
44 | tar cf $(DISTTAR) $(DISTBUILD) | |
09a131dd | 45 | -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) |
41b9d8ec TC |
46 | gzip $(DISTTAR) |
47 | ||
48 | # tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache' | |
49 | ||
e9c9a2be TC |
50 | # recent ExtUtils::Manifest don't copy the executable bit, fix that here |
51 | ||
8bf647a0 | 52 | distdir: docs dbinfo version |
09a131dd | 53 | -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) |
41b9d8ec | 54 | perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')" |
8bf647a0 | 55 | perl site/util/make_versions.pl $(DISTBUILD)/$(BSEMODULES) |
6e73144d TC |
56 | mkdir $(DISTBUILD)/site/htdocs/shop |
57 | find $(DISTBUILD) -type f | xargs chmod u+w | |
e9c9a2be | 58 | for i in `cat MANIFEST` ; do if [ -x $$i ] ; then chmod a+x $(DISTBUILD)/$$i ; fi ; done |
41b9d8ec TC |
59 | |
60 | clean: | |
09a131dd | 61 | -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html |
41b9d8ec TC |
62 | -cd site/htdocs/images ; \ |
63 | for i in *.gif ; do \ | |
64 | if [ $$i != trans_pixel.gif ] ; then \ | |
65 | rm $$i ; \ | |
66 | fi ; \ | |
67 | done | |
09a131dd TC |
68 | -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg |
69 | -perl -MExtUtils::Command -e rm_rf $(DISTBUILD) | |
41b9d8ec | 70 | |
6e73144d | 71 | docs: INSTALL.txt INSTALL.html otherdocs |
41b9d8ec | 72 | |
6e73144d TC |
73 | INSTALL.txt: INSTALL.pod |
74 | pod2text <INSTALL.pod >INSTALL.txt | |
41b9d8ec TC |
75 | |
76 | INSTALL.html: INSTALL.pod | |
77 | pod2html --infile=INSTALL.pod --outfile=INSTALL.html | |
0f35f2b7 | 78 | -rm pod2html-dircache pod2html-itemcache pod2htmd.tmp pod2htmi.tmp |
41b9d8ec TC |
79 | |
80 | otherdocs: | |
81 | cd site/docs ; make all | |
6e73144d | 82 | |
b19047a6 TC |
83 | dbinfo: site/util/mysql.str |
84 | ||
85 | site/util/mysql.str: schema/bse.sql | |
86 | perl schema/mysql_build.pl >site/util/mysql.str | |
87 | ||
d2730773 TC |
88 | version: site/cgi-bin/modules/BSE/Version.pm |
89 | ||
ed1ff43e | 90 | site/cgi-bin/modules/BSE/Version.pm: $(VERSIONDEPS) |
0f35f2b7 | 91 | perl site/util/bse_mkgitversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm |
7057fbc0 | 92 | |
8bf647a0 | 93 | modversion: $(BSEMODULES) |
75b07edf | 94 | |
8bf647a0 TC |
95 | $(BSEMODULES): $(MODULES) site/util/make_versions.pl |
96 | perl site/util/make_versions.pl $(BSEMODULES) | |
75b07edf | 97 | |
6e73144d TC |
98 | # this is very rough |
99 | testinst: distdir | |
100 | perl localinst.perl $(DISTBUILD) | |
09a131dd | 101 | perl -MExtUtils::Command -e rm_rf $(DISTBUILD) |
2076966c | 102 | cd `perl -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; perl loaddata.pl ../data/db |
34bc5961 | 103 | |
cb7fd78d | 104 | testup: checkver distdir |
34bc5961 | 105 | perl localinst.perl $(DISTBUILD) leavedb |
09a131dd | 106 | perl -MExtUtils::Command -e rm_rf $(DISTBUILD) |
a47e539f | 107 | 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 | 108 | |
cb7fd78d | 109 | checkver: |
0f35f2b7 | 110 | if [ -d .git ] ; then perl site/util/check_versions.pl ; fi |
cb7fd78d | 111 | |
87b53bfa | 112 | TEST_FILES=t/*.t |
e4a9e7c6 | 113 | TEST_VERBOSE=0 |
87b53bfa TC |
114 | |
115 | test: testup | |
e4a9e7c6 | 116 | perl '-MTest::Harness=runtests,$$verbose' -Isite/cgi-bin/modules -It -e '$$verbose=$(TEST_VERBOSE); runtests @ARGV' $(TEST_FILES) |
35c0719f TC |
117 | |
118 | manicheck: | |
119 | perl -MExtUtils::Manifest=manicheck -e 'manicheck()' | |
120 | ||
121 | filecheck: | |
122 | perl -MExtUtils::Manifest=filecheck -e 'filecheck()' | |
91238c38 TC |
123 | |
124 | manifest: | |
125 | perl -MExtUtils::Manifest=mkmanifest -e mkmanifest |