File: Makefile

package info (click to toggle)
headache 1.08-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: ml: 707; xml: 218; makefile: 73; sh: 8
file content (55 lines) | stat: -rw-r--r-- 1,852 bytes parent folder | download | duplicates (3)
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
##########################################################################
#                                                                        #
#                               Headache                                 #
#                                                                        #
#          Vincent Simonet, Projet Cristal, INRIA Rocquencourt           #
#                                                                        #
#  Copyright 2002                                                        #
#  Institut National de Recherche en Informatique et en Automatique.     #
#  All rights reserved.  This file is distributed under the terms of     #
#  the GNU Library General Public License.                               #
#                                                                        #
#  Vincent.Simonet@inria.fr           http://cristal.inria.fr/~simonet/  #
#                                                                        #
##########################################################################

DOC_SRC?= .
MANUAL := $(DOC_SRC)/manual

DOC_FILES= $(addprefix $(MANUAL)., pdf ps.gz html txt)

.PHONY: doc clean-doc install-doc

doc: $(DOC_FILES)

clean-doc:
	rm -f $(addprefix $(MANUAL)., pdf ps ps.gz dvi aux log thm txt html haux htoc)

clean:: clean-doc

$(MANUAL).dvi: $(MANUAL).tex
	cd $(dir $@) && latex $(notdir $<)
	cd $(dir $@) && latex $(notdir $<)

$(MANUAL).ps: $(MANUAL).dvi
	dvips -t a4 -o $@ $<

$(MANUAL).ps.gz: $(MANUAL).ps
	gzip -c $< > $@

$(MANUAL).pdf: $(MANUAL).dvi
	dvipdfm -p a4 -o $@ $<

$(MANUAL).html: $(MANUAL).tex $(MANUAL).dvi
	hevea -o $@ $<

$(MANUAL).txt: $(MANUAL).tex $(MANUAL).dvi
	hevea -o $@ -text $<

install-doc::
ifndef DOC_INSTALLDIR
	$(error "Please define DOC_INSTALLDIR.")
else
	mkdir -p $(DOC_INSTALLDIR)/
	cp -f $(DOC_FILES) $(DOC_INSTALLDIR)/
endif