| 1 |
# Makefile for a manual in the Debian Documentation Project manuals.sgml
|
| 2 |
# tree.
|
| 3 |
|
| 4 |
# The directory in which this makefile resides must also contain a file
|
| 5 |
# called <directoryname>.sgml, which is the top-level file for the manual
|
| 6 |
# in this directory.
|
| 7 |
|
| 8 |
# What is the current manual's name
|
| 9 |
MANUAL := $(shell basename $(shell pwd))
|
| 10 |
# Where are we publishing to?
|
| 11 |
PUBLISHDIR := ../../../public_html/manuals.html
|
| 12 |
|
| 13 |
# What do we want?
|
| 14 |
all: publish
|
| 15 |
|
| 16 |
# This target installs the generated HTML in the published directory.
|
| 17 |
publish: html
|
| 18 |
# fail if there is no PUBLISHDIR
|
| 19 |
[ -d $(PUBLISHDIR) ] || exit 1
|
| 20 |
rm -f $(PUBLISHDIR)/$(MANUAL)/*.html
|
| 21 |
install -d -m 755 $(PUBLISHDIR)/$(MANUAL)
|
| 22 |
install -m 644 --preserve-timestamps $(MANUAL).html/*.html \
|
| 23 |
$(PUBLISHDIR)/$(MANUAL)/
|
| 24 |
|
| 25 |
html: $(wildcard *.sgml)
|
| 26 |
debiandoc2html $(MANUAL).sgml
|
| 27 |
touch htmlmade
|
| 28 |
|
| 29 |
clean:
|
| 30 |
rm -rf $(MANUAL).html htmlmade
|
| 31 |
|
| 32 |
distclean: clean
|
| 33 |
|