]> git.imager.perl.org - bse.git/blobdiff - Makefile
allow purchase of products with missing options
[bse.git] / Makefile
index 227f6cea385d6e991b78a6bed8ea1f98db29e393..22d1f27af0dc5764d0aca4d0158f8bf81a304f16 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
-VERSION=0.23
+VERSION=0.25
 DISTNAME=bse-$(VERSION)
 DISTBUILD=$(DISTNAME)
 DISTTAR=../$(DISTNAME).tar
 DISTTGZ=$(DISTTAR).gz
 WEBBASE=/home/tony/www/bse
 PERL=$(shell perl -It -MBSE::Test -e 'print BSE::Test::test_perl()')
-PERLBIN=$(shell $(PERL) -MConfig -e 'print $Config{installbin}')
+PERLBIN=$(shell $(PERL) -MConfig -e 'print $$Config{installbin}')
 
 BSEMODULES=site/cgi-bin/modules/BSE/Modules.pm
 
@@ -19,6 +19,13 @@ VERSIONDEPS=$(shell $(PERL) site/util/bse_versiondeps.pl MANIFEST)
 POD2TEXT=$(PERLBIN)/pod2text
 POD2HTML=$(PERLBIN)/pod2html
 
+UTILDIR=$(shell $(PERL) -Ilib -MBSE::Install=util_dir -e 'print util_dir')
+DATADIR=$(shell $(PERL) -Ilib -MBSE::Install=data_dir -e 'print data_dir')
+
+.PHONY: help dist cleantree archive distdir clean docs otherdocs dbinfo
+.PHONY: version modversion testinst test testup checkver regen_known_errors
+.PHONY: manicheck filecheck manifect htmldocs
+
 help:
        @echo make dist - build the tar.gz file and copy to distribution directory
        @echo make 'archive - build the tar.gz (in the parent directory)'
@@ -64,7 +71,7 @@ distdir: docs dbinfo version
        $(PERL) site/util/make_versions.pl $(DISTBUILD)/$(BSEMODULES)
        mkdir $(DISTBUILD)/site/htdocs/shop
        find $(DISTBUILD) -type f | xargs chmod u+w
-       for i in `cat MANIFEST` ; do if [ -x $$i ] ; then chmod a+x $(DISTBUILD)/$$i ; fi ; done
+       for i in `cat MANIFEST | sed -e 's/\s.*//'` ; do if [ -x $$i ] ; then chmod a+x $(DISTBUILD)/$$i ; fi ; done
 
 clean:
        $(NOOP)
@@ -72,10 +79,12 @@ clean:
 docs: INSTALL.txt INSTALL.html otherdocs
 
 INSTALL.txt: INSTALL.pod
-       $(POD2TEXT) <INSTALL.pod >INSTALL.txt
+       $(POD2TEXT) <INSTALL.pod >INSTALL.tmp
+       mv INSTALL.tmp INSTALL.txt
 
 INSTALL.html: INSTALL.pod
-       $(POD2HTML) --infile=INSTALL.pod --outfile=INSTALL.html
+       $(POD2HTML) --infile=INSTALL.pod --outfile=INSTALL.htmp
+       mv INSTALL.htmp INSTALL.html
        -rm pod2html-dircache pod2html-itemcache pod2htmd.tmp pod2htmi.tmp
 
 otherdocs:
@@ -100,12 +109,20 @@ $(BSEMODULES): $(MODULES) site/util/make_versions.pl
 testinst: distdir
        $(PERL) localinst.perl $(DISTBUILD)
        $(PERL) -MExtUtils::Command -e rm_rf $(DISTBUILD)
-       cd `$(PERL) -lne 'do { print $$1; exit; } if /^base_dir\s*=\s*(.*)/' test.cfg`/util ; $(PERL) loaddata.pl ../data/db
+       cd $(UTILDIR) ; $(PERL) loaddata.pl $(DATADIR)/db
 
-testup: checkver distdir
+testupx: checkver distdir
        $(PERL) localinst.perl $(DISTBUILD) leavedb
        $(PERL) -MExtUtils::Command -e rm_rf $(DISTBUILD)
-       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
+       cd $(UTILDIR) ; $(PERL) upgrade_mysql.pl -b ; $(PERL) loaddata.pl $(DATADIR)/db
+
+testload :
+       $(PERL) '-MTest::Harness=runtests,$$verbose' -Isite/cgi-bin/modules -It -e '$$verbose=$(TEST_VERBOSE); runtests @ARGV' t/t000load.t
+
+testup : testload checkver distdir
+       $(PERL) localinst.perl $(DISTBUILD) leavedb
+       $(PERL) -MExtUtils::Command -e rm_rf $(DISTBUILD)
+       cd $(UTILDIR) ; $(PERL) upgrade_mysql.pl -b ; $(PERL) loaddata.pl $(DATADIR)/db
 
 checkver:
        if [ -d .git ] ; then perl site/util/check_versions.pl ; fi
@@ -113,11 +130,14 @@ checkver:
 TEST_FILES=t/*.t t/*/*.t
 TEST_VERBOSE=0
 
-test: testup
+test: testupx
        $(PERL) '-MTest::Harness=runtests,$$verbose' -Isite/cgi-bin/modules -It -e '$$verbose=$(TEST_VERBOSE); runtests @ARGV' $(TEST_FILES)
 
+test_load: testup
+       $(PERL) '-MTest::Harness=runtests,$$verbose' -Isite/cgi-bin/modules -It -e '$$verbose=$(TEST_VERBOSE); runtests @ARGV' t/t000load.t
+
 regen_known_errors:
-       $(PERL) t/t98podcheck.t -r
+       $(PERL) t/900-kwalitee/040-podcheck.t -r
 
 manicheck:
        $(PERL) -MExtUtils::Manifest=manicheck -e 'manicheck()'