File: Makefile

package info (click to toggle)
cdd-doc 0.3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 228 kB
  • ctags: 17
  • sloc: makefile: 87
file content (84 lines) | stat: -rw-r--r-- 2,775 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
## ----------------------------------------------------------------------
## Makefile : makefile for debiandoc-sgml-doc
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
## Document definitions
doc_lang	:= en
doc_name	:= debian-cdd
doc_sgml	:= $(doc_name).$(doc_lang).sgml
doc_pdf		:= $(doc_name).$(doc_lang).pdf
doc_ps		:= $(doc_name).$(doc_lang).ps
doc_dvi		:= $(doc_name).$(doc_lang).dvi
doc_txt		:= $(doc_name).$(doc_lang).txt
doc_info	:= $(doc_name).$(doc_lang).info
doc_html	:= $(doc_name).html
pkg             := cdd-doc

## ----------------------------------------------------------------------
## Package definitions
pkg_lang	:= en

## ----------------------------------------------------------------------
## General definitions
LN		:= /bin/ln -sf
RMR		:= /bin/rm -fr
LOCALE          := unset LC_ALL;  

## ----------------------------------------------------------------------
# this can and will be overriden by a higher level makefile
PUBLISHDIR := tille@people.debian.org:public_html/debian-med/talks/paper-cdd

# There is no difference between letter and a4, but a2 for instance works
PAPERSIZE  := letter

## ----------------------------------------------------------------------
## Targets
all:		html

validate: 	$(doc_sgml)
	# nsgmls -ges -wall $(doc_sgml)
		nsgmls -wall -E20 -gues $^

html $(doc_html): $(doc_sgml)
		$(LOCALE) debiandoc2html -l $(doc_lang) -b $(doc_name) -c $^
		$(LN) index.$(pkg_lang).html $(doc_html)/index.html

txt $(doc_txt): $(doc_sgml)
		debiandoc2text -l $(doc_lang) $^

ps $(doc_ps): 	$(doc_sgml)
		debiandoc2latexps  -l $(doc_lang) -p$(PAPERSIZE) $^

pdf $(doc_pdf): $(doc_sgml)
		$(LOCALE) debiandoc2latexpdf -l $(doc_lang) -p$(PAPERSIZE) $^
		$(RMR) $(doc_name).$(doc_lang).tpt

dvi $(doc_dvi): $(doc_sgml)
		debiandoc2latexdvi -l $(doc_lang) -p$(PAPERSIZE) $^
		$(RMR) $(doc_name).$(doc_lang).out

info $(doc_info): $(doc_sgml)
		debiandoc2info -l $(doc_lang) $^

publish: 	$(doc_html)/index.html
		rsync --rsh="ssh -i ${HOME}/.ssh/id_dsa-debian" -azult --delete $(doc_html) $(PUBLISHDIR)
		[ -s debian-cdd.en.pdf ] && rsync --rsh="ssh -i ${HOME}/.ssh/id_dsa-debian" -azult $(doc_pdf) $(PUBLISHDIR)

clean:
		$(RMR) $(doc_html) $(doc_pdf) $(doc_txt) $(doc_ps) $(doc_dvi) $(doc_info)
		$(RMR) $(doc_name).$(doc_lang).tpt $(doc_name).$(doc_lang).out
		find . -name "*~" -exec $(RMR) \{\} \;

dist:
	target=$(pkg)-`cat VERSION` ; \
	mkdir -p $${target} ; \
	rsync -azult Makefile *.sgml en debian --exclude=CVS --exclude=.svn $${target} ; \
	GZIP=-9 tar -czf $(pkg)_`cat VERSION`.tar.gz $${target} ; \
	rm -rf $${target}

distclean:
		make clean
		rm -f $(pkg)_`cat VERSION`.tar.gz

.PHONY: all publish clean distclean validate