]> git.imager.perl.org - bse.git/blob - Makefile
c4d20b8a00a0dcd4d6b7b2f2de37e3b4d24c85cf
[bse.git] / Makefile
1 VERSION=0.11
2 DISTNAME=bse-$(VERSION)
3 DISTBUILD=$(DISTNAME)
4 DISTTAR=../$(DISTNAME).tar
5 DISTTGZ=$(DISTTAR).gz
6
7 help:
8         @echo make dist - build the tar.gz file
9         @echo make clean - delete generated files
10         @echo make distdir - build distribution directory
11         @echo make docs - build documentation
12
13 # this target needs to be modified so that the output directory includes
14 # the release number
15 dist: $(DISTTGZ)
16
17 $(DISTTGZ): distdir
18         if [ -e $(DISTTGZ) ] ; \
19           then echo $(DISTTGZ) already exists ; \
20                exit 1 ; \
21         fi
22         tar cf $(DISTTAR) $(DISTBUILD)
23         -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
24         gzip $(DISTTAR)
25
26 #       tar czf $(DISTFILE) -C .. bse --exclude '*~' --exclude '*,v' --exclude 'pod2html-*cache'
27
28 distdir: docs
29         -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
30         perl -MExtUtils::Manifest=manicopy,maniread -e "manicopy(maniread(), '$(DISTBUILD)')"
31         mkdir $(DISTBUILD)/site/htdocs/shop
32         find $(DISTBUILD) -type f | xargs chmod u+w
33
34 clean:
35         -perl -MExtUtils::Command -e rm_f site/htdocs/index.html site/htdocs/shop/*.html site/htdocs/a/*.html
36         -cd site/htdocs/images ; \
37         for i in *.gif ; do \
38           if [ $$i != trans_pixel.gif ] ; then \
39             rm $$i ; \
40           fi ; \
41         done
42         -perl -MExtUtils::Command -e rm_f site/htdocs/images/*.jpg
43         -perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
44
45 docs: INSTALL.txt INSTALL.html otherdocs
46
47 INSTALL.txt: INSTALL.pod
48         pod2text <INSTALL.pod >INSTALL.txt
49
50 INSTALL.html: INSTALL.pod
51         pod2html --infile=INSTALL.pod --outfile=INSTALL.html
52         -rm pod2html-dircache pod2html-itemcache
53
54 otherdocs:
55         cd site/docs ; make all
56
57 # this is very rough
58 testinst: distdir
59         perl localinst.perl $(DISTBUILD)
60         perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
61
62 testfiles: distdir
63         perl localinst.perl $(DISTBUILD) leavedb
64         perl -MExtUtils::Command -e rm_rf $(DISTBUILD)
65
66