]>
Commit | Line | Data |
---|---|---|
913bdd17 | 1 | VERSION=0.18 |
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 TC |
7 | |
8 | help: | |
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 | 18 | dist: 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 | |
25 | cleantree: | |
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 |
32 | archive: $(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 | 47 | distdir: 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 | |
54 | clean: | |
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 | 65 | docs: INSTALL.txt INSTALL.html otherdocs |
41b9d8ec | 66 | |
6e73144d TC |
67 | INSTALL.txt: INSTALL.pod |
68 | pod2text <INSTALL.pod >INSTALL.txt | |
41b9d8ec TC |
69 | |
70 | INSTALL.html: INSTALL.pod | |
71 | pod2html --infile=INSTALL.pod --outfile=INSTALL.html | |
72 | -rm pod2html-dircache pod2html-itemcache | |
73 | ||
74 | otherdocs: | |
75 | cd site/docs ; make all | |
6e73144d | 76 | |
b19047a6 TC |
77 | dbinfo: site/util/mysql.str |
78 | ||
79 | site/util/mysql.str: schema/bse.sql | |
80 | perl schema/mysql_build.pl >site/util/mysql.str | |
81 | ||
d2730773 TC |
82 | version: site/cgi-bin/modules/BSE/Version.pm |
83 | ||
84 | site/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 |
94 | svnversion: |
95 | perl site/util/bse_mksvnversion.pl $(VERSION) site/cgi-bin/modules/BSE/Version.pm | |
96 | ||
6e73144d TC |
97 | # this is very rough |
98 | testinst: 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 | 103 | testup: 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 |
108 | TEST_FILES=t/*.t |
109 | ||
110 | test: testup | |
111 | perl -MTest::Harness=runtests -Isite/cgi-bin/modules -It -e 'runtests @ARGV' $(TEST_FILES) | |
35c0719f TC |
112 | |
113 | manicheck: | |
114 | perl -MExtUtils::Manifest=manicheck -e 'manicheck()' | |
115 | ||
116 | filecheck: | |
117 | perl -MExtUtils::Manifest=filecheck -e 'filecheck()' |