source: soft/build_system/build_system/mkcd/tags/v2-9-1/Makefile @ 1

Last change on this file since 1 was 1, checked in by fasma, 12 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 1.9 KB
Line 
1VERSION = 2.9.1
2NAME = mkcd
3
4DOC = mkcd
5
6ALL = 
7HTML_STYLE = "/usr/share/sgml/docbook/xsl-stylesheets-1.47/html/docbook.xsl"
8PDF_STYLE = "/usr/share/sgml/docbook/xsl-stylesheets-1.47/fo/docbook.xsl"
9TXT_STYLE =
10TEX_STYLE =
11JARPATH = "/home/warly/local/lib/java/jar"
12CLASSPATH = "$(JARPATH)/fop.jar:$(JARPATH)/batik.jar:$(JARPATH)/xalan.jar:$(JARPATH)/xerces.jar"
13
14PERL_SITELIB=$(shell eval "`perl -V:installsitelib`"; echo $$installsitelib)
15
16install: $(ALL)
17        install -d $(PREFIX)/usr/bin
18        install mkcd $(PREFIX)/usr/bin
19        install clean-rpmsrate $(PREFIX)/usr/bin
20        install -d $(PREFIX)/$(PERL_SITELIB)/Mkcd
21        install pm/Mkcd/* $(PREFIX)/$(PERL_SITELIB)/Mkcd/
22
23dis: clean
24        rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
25        mkdir -p $(NAME)-$(VERSION)
26        find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
27        find $(NAME)-$(VERSION) -type d -name CVS -o -name .cvsignore -o -name unused |xargs rm -rf
28        perl -p -i -e 's|^%define version.*|%define version $(VERSION)|' $(NAME).spec
29        tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
30        bzip2 -9f ../$(NAME)-$(VERSION).tar
31        rm -rf $(NAME)-$(VERSION)
32
33rpm: dis ../$(NAME)-$(VERSION).tar.bz2 $(RPM)
34        cp -f ../$(NAME)-$(VERSION).tar.bz2 $(RPM)/SOURCES
35        cp -f $(NAME).spec $(RPM)/SPECS/
36        -rpm -ba --clean --rmsource $(NAME).spec
37        rm -f ../$(NAME)-$(VERSION).tar.bz2
38
39doc:    $(DOC).html $(DOC).pdf $(DOC).ps $(DOC).txt
40
41clean:
42        -rm -f *~ pm/Mkcd/*~ doc/*~
43
44$(DOC).html: $(DOC).xml $(HTML_STYLE)
45        xsl-c -in $(DOC).xml -xsl $(HTML_STYLE) -out $(DOC).html
46
47$(DOC).txt: $(DOC).html
48        lynx -dump $(DOC).html
49
50$(DOC).ps: $(DOC).tex
51        pdf2ps $(DOC).pdf $(DOC).ps
52
53$(DOC).pdf: $(DOC).fo
54        java -classpath $(CLASSOATH) org.apache.fop.apps.Fop $(DOC).fo $(DOC).pdf
55
56$(DOC).fo: $(DOC).xml pdf.xsl
57        xsl-c -in $(DOC).xml -xsl "file://$(PDF_STYLE)" -out $(DOC).fo
58
59java-html:
60        java -classpath $(CLASSPATH) org.apache.xalan.xslt.Process -in $(DOC).xml -xsl "file://$(HTML_STYLE)" -out $(DOC).html
61
Note: See TracBrowser for help on using the repository browser.