summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 55 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 427017b..a92691a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,31 @@
-OUTPUTS=policy.html policy.txt policy.ps policy.db
+#!/usr/bin/make -f
+
+# Tools used
+# Placed here in case we decide to use autoconf
+DVIPS = dvips
+PS2PDF = ps2pdf
+
+ifeq ("$(shell dh_testversion 2.0.40 && echo potatoorabove)", "potatoorabove")
+DOC = usr/share/doc
+MAN = usr/share/man
+DATA = usr/share/misc
+else
+DOC = usr/doc
+MAN = usr/man
+DATA = usr/lib
+endif
-all: policy
+# Some default variables
+PUBLISHDIR = $(DESTDIR)/$(DOC)/java-common
+# Default language to use
+LANGUAGE = LANG=C
+
+all: policy debian-java-faq
+
+# Policy part
+OUTPUTS=policy.html policy.txt policy.ps policy.db
-policy: policy.ps policy.txt policy.html
+policy: policy.ps policy.txt policy.html
policy.tex: policy.db
jade -t tex \
@@ -14,7 +37,7 @@ policy.dvi: policy.tex
jadetex $<
policy.ps: policy.dvi
- dvips -f $< > $@
+ $(DVIPS) -f $< > $@
policy.html: policy.db html.dsl
jade -t sgml \
@@ -30,10 +53,35 @@ policy.txt: policy.db
validate:
nsgmls -s -wxml /usr/lib/sgml/declaration/xml.decl policy.db
+ nsgmls -s debian-java-faq.sgml
-install: $(OUTPUTS)
- install -m 0444 $(OUTPUTS) *.html $(DESTDIR)/usr/doc/java-common
+install:: $(OUTPUTS)
+ install -m 0444 $(OUTPUTS) $(PUBLISHDIR)
clean:
- rm -f *.html *.aux *.log *.dvi *.ps *.tex *.txt
+ rm -rf *.html *.aux *.log *.dvi *.ps *.tex *.txt
+
+# For the debian-java-FAQ
+# by Javier Fernández-Sanguino Peña <jfs@computer.org>
+
+debian-java-faq: debian-java-faq.html debian-java-faq.ps debian-java-faq.txt
+
+OUTPUTS += debian-java-faq.ps debian-java-faq.txt
+
+debian-java-faq.html: debian-java-faq.sgml
+ $(LANGUAGE) debiandoc2html debian-java-faq.sgml
+debian-java-faq.dvi: debian-java-faq.sgml
+ $(LANGUAGE) debiandoc2latexdvi debian-java-faq.sgml
+
+%.ps : %.dvi
+ $(DVIPS) $< -o $@
+%.pdf: %.ps
+ $(PS2PDF) $< $@
+
+debian-java-faq.txt: debian-java-faq.sgml
+ $(LANGUAGE) debiandoc2text debian-java-faq.sgml
+install ::
+ rm -f $(PUBLISHDIR)/debian-java-faq.html
+ mkdir $(PUBLISHDIR)/debian-java-faq.html
+ install -p -m 644 debian-java-faq.html/*.html $(PUBLISHDIR)/debian-java-faq.html/