summaryrefslogtreecommitdiff
path: root/Makefile
blob: 240ddf7e6e4f76152fa851d8704c91da33f4c02e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f 

# Good info at: info make "Quick Reference"
# $^ All prerequisites
# $< First prerequisity
# $@ Target

# Some default variables
DOC = usr/share/doc
DVIPS=dvips
PUBLISHDIR=$(DESTDIR)/$(DOC)/java-common
#DSLF=work.dsl
#DSL=-d $(DSLF)
# Default language to use
LANGUAGE=
LANG=C
LC_CTYPE=C

all: debian-java-policy debian-java-faq-gen
publish: policy.html
	scp debian-java-policy.html/*.html opal@people.debian.org:public_html/java/policy.html

# Policy part
MAKEOUT=policy.txt policy.ps
OUTPUTS=$(MAKEOUT) policy.xml
MAKEDEP=$(MAKEOUT) policy.html 

debian-java-policy: $(MAKEDEP)
update: debian-java-faq-update

policy.tex: policy.xml
	jw $(DCL) -b tex $(DSL) policy.xml

policy.dvi: policy.xml
	jw $(DCL) -b dvi $(DSL) policy.xml

policy.ps: policy.dvi
	$(DVIPS) -f $< > $@

policy.html: policy.xml
	# docbook and dsl file needs to be in that dir for things to work.
	# The png file is copied there so it can be referenced in a proper way.
	mkdir -p debian-java-policy.html
	cp $^ html
	jw -b html $(DSL) -o debian-java-policy.html $<
	# To make that file the intdex.
	(cd debian-java-policy.html; rm -f $^)

policy.txt: policy.xml
	jw -u $< > dump.html
	lynx -force_html -dump dump.html > $@
	-rm -f dump.html

install: debian-java-policy-install debian-java-faq-install

debian-java-policy-install:
	install -m 0444 $(OUTPUTS) $(PUBLISHDIR)
	cp -a debian-java-policy.html $(PUBLISHDIR)
	ln -s debian-java-policy.html $(PUBLISHDIR)/html

clean: debian-java-faq
	-rm -Rf debian-java-policy.html
	-rm -f $(MAKEOUT)
	-rm -f policy.dvi
	(cd $<; make clean)

debian-java-faq-gen: debian-java-faq
	(cd $<; make debian-java-faq.html/index.html)

# Change the publish dir if you want to send it to a new package.
debian-java-faq-install: debian-java-faq debian-java-faq-gen
	(cd $<; make publish PUBLISHDIR=$(PUBLISHDIR))

debian-java-faq:
	(cvs -d :pserver:anonymous@cvs.debian.org:/cvs/debian-doc -z3 checkout -d debian-java-faq ddp/manuals.sgml/java-faq)

debian-java-faq-update: debian-java-faq
	(cd $<; cvs -z3 update -d)