/[ddp]/manuals/trunk/xml-sgml-policy/Makefile
ViewVC logotype

Contents of /manuals/trunk/xml-sgml-policy/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2086 - (show annotations) (download)
Sat Jan 18 22:37:43 2003 UTC (10 years, 4 months ago) by aph
File size: 1581 byte(s)
first cut, stub; no building rules yet
1 #
2 # Standard Debian Documentation Project Makefile
3 #
4 # Should work both for a manual in the DDP CVS tree, and for a package build.
5
6 # basename for the manual
7 MANUAL := $(notdir $(CURDIR))
8 # XML source we're building
9 # fixme: subdirs?
10 XMLFILES := $(wildcard [a-zA-Z]*.xml)
11 XML_VALIDATE := xmllint
12
13 # this can and will be overriden by a higher level makefile
14 PUBLISHDIR := /org/www.debian.org/www/doc/manuals
15
16 all: html txt ps pdf
17
18 ##
19 ## rules to build
20 ##
21 # fixme: add the rules
22
23 # publishing to the DDP web pages
24 publish: all
25 test -d $(PUBLISHDIR)/$(MANUAL) || install -d -m 755 $(PUBLISHDIR)/$(MANUAL)
26 rm -f $(PUBLISHDIR)/$(MANUAL)/*.html
27 install -p -m 644 $(MANUAL)*.html/*.html $(PUBLISHDIR)/$(MANUAL)/
28 # possible non-POSIX syntax below, but oh well
29 cd $(PUBLISHDIR)/$(MANUAL) && for file in *.en.html; do \
30 ln -s $$file $${file%$${file#$${file%.en.html}}}.html; \
31 done
32 install -p -m 644 $(MANUAL)*.txt $(MANUAL)*.ps $(MANUAL)*.pdf $(PUBLISHDIR)/$(MANUAL)
33 ln -sf $(MANUAL).en.txt $(PUBLISHDIR)/$(MANUAL)/$(MANUAL).txt
34 ln -sf $(MANUAL).en.ps $(PUBLISHDIR)/$(MANUAL)/$(MANUAL).ps
35 ln -sf $(MANUAL).en.pdf $(PUBLISHDIR)/$(MANUAL)/$(MANUAL).pdf
36
37 # validate our XML files
38 .PHONY: validate
39 validate: $(addsuffix .validate,$(XMLFILES))
40
41 %.validate : %
42 $(XML_VALIDATE) $<
43
44 %.date: %.xml
45 date +"%e %b, %Y" --reference=$< > $@
46
47 # cleaning up
48 clean distclean:
49 rm -f $(MANUAL)*.{txt,ps,dvi,pdf,info*,log,tex,aux,toc,out,sasp*} *~
50 rm -rf $(MANUAL)*.html
51
52 .PHONY: all publish clean distclean validate
53 .SUFFIXES:
54
55 # delete target if rule fails
56 .DELETE_ON_ERROR:

  ViewVC Help
Powered by ViewVC 1.1.5