| 1 |
#
|
| 2 |
# Makefile for the dselect beginners guide, language subdirectory
|
| 3 |
#
|
| 4 |
|
| 5 |
export PATH:=../../quick-reference/bin/:${PATH}
|
| 6 |
|
| 7 |
manual := dselect-beginner
|
| 8 |
|
| 9 |
currentlang := $(notdir $(CURDIR))
|
| 10 |
currentlangcn := $(subst _,-,$(shell echo $(currentlang) | tr A-Z a-z))
|
| 11 |
|
| 12 |
# this can and will be overriden by a higher level makefile
|
| 13 |
PUBLISHDIR := /org/www.debian.org/www/doc/manuals
|
| 14 |
|
| 15 |
sources := $(wildcard *.sgml) ../$(manual).ent
|
| 16 |
|
| 17 |
export LANG=C
|
| 18 |
# stupid debiandoc stuff uses strings in another language otherwise
|
| 19 |
|
| 20 |
all: html text ps pdf
|
| 21 |
|
| 22 |
publish: all
|
| 23 |
test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
|
| 24 |
rm -f $(PUBLISHDIR)/$(manual)/*.$(currentlangcn).html
|
| 25 |
install -p -m 644 $(manual).$(currentlang).html/*.html $(PUBLISHDIR)/$(manual)
|
| 26 |
install -p -m 644 $(manual)*.txt $(manual)*.ps $(manual)*.pdf $(PUBLISHDIR)/$(manual)
|
| 27 |
|
| 28 |
validate:
|
| 29 |
nsgmls -ges -wall $(manual).sgml
|
| 30 |
|
| 31 |
html: $(manual).$(currentlang).html/index.$(currentlangcn).html
|
| 32 |
$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
|
| 33 |
debiandoc2html -c -l $(currentlang) $<
|
| 34 |
|
| 35 |
text: $(manual).$(currentlang).txt
|
| 36 |
$(manual).$(currentlang).txt: $(sources)
|
| 37 |
debiandoc2text -l $(currentlang) $<
|
| 38 |
|
| 39 |
$(manual).$(currentlang).info: $(sources)
|
| 40 |
debiandoc2info -l $(currentlang) $<
|
| 41 |
# TODO: rename to .$(currentlang).info?
|
| 42 |
|
| 43 |
$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
|
| 44 |
$(manual).$(currentlang).%: $(sources)
|
| 45 |
debiandoc2latex$* -l $(currentlang) $<
|
| 46 |
|
| 47 |
ps dvi pdf info: %: $(manual).$(currentlang).%
|
| 48 |
|
| 49 |
clean distclean:
|
| 50 |
rm -rf $(manual)*.$(currentlang).html
|
| 51 |
rm -f $(manual)*.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*,tpt}
|
| 52 |
rm -f *~ .*~ core tsa*
|
| 53 |
|
| 54 |
.PHONY: all publish clean distclean validate
|