summaryrefslogtreecommitdiff
path: root/debian-java-faq/Makefile
blob: 75c2ec58cb1b317a7dc5ae8a8401f30e0784307a (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
# Makefile for a manual in the Debian Documentation Project manuals.sgml
# tree.

# The directory in which this makefile resides must also contain a file
# called <directoryname>.sgml, which is the top-level file for the manual
# in this directory.

# What is the current manual's name
#MANUAL :=	$(shell basename $(shell pwd))
MANUAL :=	debian-java-faq
# Where are we publishing to?
#  (this can be overriden by a higher level makefile)
PUBLISHDIR := /org/www.debian.org/www/doc/manuals

# What do we want by default?
all:		publish

# This target installs the generated HTML in the published directory.
publish:	$(MANUAL).html/index.html
# 		fail if there is no PUBLISHDIR
		[ -d $(PUBLISHDIR) ] || exit 1
		rm -f $(PUBLISHDIR)/$(MANUAL)/*.html
		install -d -m 755 $(PUBLISHDIR)/$(MANUAL)
		install -m 644 --preserve-timestamps $(MANUAL).html/*.html \
			$(PUBLISHDIR)/$(MANUAL)/

generate:	$(MANUAL).html/index.html

$(MANUAL).html/index.html:	$(wildcard *.sgml)
		debiandoc2html $(MANUAL).sgml

# ensure our SGML is valid
#   (add this to $(MANUAL).html rule to prevent building if not)
validate:
		nsgmls -gues $(MANUAL).sgml

clean:
		rm -rf $(MANUAL).html

distclean:	clean

.PHONY: all publish clean distclean validate