File: Makefile

package info (click to toggle)
sysadmin-guide 0.6.2-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 352 kB
  • ctags: 14
  • sloc: makefile: 70; sh: 22
file content (56 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download
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
docs = sag.sgml
figs = overview-kernel.fig backup-timeline.fig fstree.fig hd-layout.fig \
	hd-mount-mounted.fig hd-mount-separate.fig hd-schematic.fig \
	logins-via-terminals.fig

# You should not need to touch anything below this.

HTML_DSL = /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
TEX_DSL = /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl

.sgml.html:
	rm -rf $@
	mkdir $@
	sed 's/graphic fileref="[^"]*/&.gif/' $< > temp.sgml
	(set -e; cd $@ && jade -t sgml -d $(HTML_DSL) ../temp.sgml && \
		ln -s book1.html index.html) || rm -rf $@
	rm -f temp.sgml

.sgml.ps:
	sed 's/graphic fileref="[^"]*/&.ps/' sag.sgml > temp.sgml
	jade -t tex -d $(TEX_DSL) temp.sgml
	jadetex temp.tex
	jadetex temp.tex
	jadetex temp.tex
	dvips -o temp.ps temp.dvi
	rm -f temp.aux temp.log temp.dvi temp.tex temp.sgml
	mv temp.ps $*.ps

.fig.gif:
	fig2dev -Lgif $< $@

.fig.ps:
	fig2dev -Lps $< $@

.SUFFIXES: $(SUFFIXES) .sgml .html .tex .ps .dvi .gif .fig

docsps = $(docs:.sgml=.ps)
docshtml = $(docs:.sgml=.html)
docstex = $(docs:.sgml=.tex) $(docs:.sgml=.log) $(docs:.sgml=.dvi) \
	  $(docs:.sgml=.aux)

gifs = $(figs:.fig=.gif)
psfigs = $(figs:.fig=.ps)

all: html ps
html: $(gifs) $(docshtml)
	for dir in $(docshtml); do cp $(gifs) $$dir/.; done
ps: $(psfigs) $(docsps)

sag-gif.sgml: sag.sgml
	sed 's/graphic fileref="[^"]*/&.gif/' sag.sgml > sag-gif.sgml
sag-ps.sgml: sag.sgml
	sed 's/graphic fileref="[^"]*/&.ps/' sag.sgml > sag-ps.sgml

clean:
	rm -rf $(docsps) $(docshtml) $(docstex) $(gifs) $(psfigs)