File: Makefile

package info (click to toggle)
junior-doc 1.16.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 80 kB
  • sloc: makefile: 58; sh: 25
file content (70 lines) | stat: -rw-r--r-- 2,136 bytes parent folder | download | duplicates (2)
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
#
# Makefile for the Debian Jr. Quick Guide
#

SRCS = junior-quickguide.sgml

# this can and will be overriden by a higher level makefile
PUBLISHDIR := ../../../public_html/junior-doc.html

# Always use the same date for the docs (for reproducible builds)
export FORCE_SOURCE_DATE := 1
export SOURCE_DATE_EPOCH ?= $(shell cd .. && dpkg-parsechangelog -S Timestamp)
SOURCE_DATE = $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +'%-d %B %Y')

all: html txt ps

publish: junior-quickguide.html/index.html
	test -d $(PUBLISHDIR)/junior-quickguide || install -d -m 755 $(PUBLISHDIR)/junior-quickguide
	rm -f $(PUBLISHDIR)/junior-quickguide/*.html
	install -p -m 644 junior-quickguide.html/*.html $(PUBLISHDIR)/junior-quickguide/

install: all
	install -d -m 755 $(DESTDIR)/usr/share/doc/junior-doc/quickguide
	install -m 644 junior-quickguide.html/*.html \
	    $(DESTDIR)/usr/share/doc/junior-doc/quickguide
	install -m 644 junior-quickguide.ps junior-quickguide.txt \
	    $(DESTDIR)/usr/share/doc/junior-doc/quickguide

faqdynamic.ent:
	echo "<!entity docdate \"$(SOURCE_DATE)\">" > faqdynamic.ent
	if [ -f ../debian/changelog ]; then \
          echo "<!entity docversion \"`cd .. && dpkg-parsechangelog -S Version`\">" >> faqdynamic.ent; \
        else \
          echo "<!entity docversion \"CVS\">" >> faqdynamic.ent; \
        fi

date.xml:
	echo '<?xml version="1.0" encoding="utf-8"?>' > date.xml
	echo '<!ENTITY date "$(SOURCE_DATE)">' >> date.xml

validate:
	nsgmls -ges -wall junior-quickguide.sgml

$(SRCS): date.xml

html junior-quickguide.html/index.html: $(SRCS)
	debiandoc2html -l en $<

txt junior-quickguide.txt: $(SRCS)
	debiandoc2text -l en $<

ps junior-quickguide.ps: $(SRCS)
	debiandoc2latexps -l en $<

dvi junior-quickguide.dvi: $(SRCS)
	debiandoc2latexdvi -l en $<

pdf junior-quickguide.pdf: $(SRCS)
	debiandoc2latexpdf -l en $<

info junior-quickguide.info: $(SRCS)
	debiandoc2info -l en $<

clean distclean:
	rm -rf junior-quickguide.html
	rm -f junior-quickguide.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*}
	rm -f *~ .*~ core tsa*
	rm -f date.xml

.PHONY: all publish clean distclean validate install