Debian Codegraph @

doc/Makefile

raw
1 # Copyright (C) 1994, 1998, 1999, 2003, 2012, 2013 Free Software Foundation
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License as
5 # published by the Free Software Foundation; either version 2, or (at
6 # your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
17 dir := doc
18 makemode := misc
19
20 targets = hurd.info $(wildcard hurd.info-*) version.texi
21 installationdir = $(infodir)
22
23 DISTFILES = $(targets)
24
25 DVIPS = dvips
26
27 include ../Makeconf
28
29 # For each .info file we need a .d file.
30 -include $(patsubst %.info,%.d,$(filter %.info,$(targets))) /dev/null
31
32 # Build dependencies from included files.
33 %.d: %.texi
34 set -e; (echo "$*.info $*.dvi: \\"; grep '^@include ' $< | \
35 sed -e 's/^[^ ]*[ ]*\([^ ]*\).*$$/ \1 \\/'; \
36 echo) > [email protected]
37 mv -f [email protected] $@
38
39 %.info: %.texi
40 @rm -f $@ $@-[0-9] $@-[0-9][0-9]
41 $(MAKEINFO) -I $(@D) -I $(<D) $<
42
43 .PRECIOUS: %.dvi
44 %.dvi: %.texi
45 TEXINPUTS=$(srcdir):$$TEXINPUTS \
46 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
47
48 %.ps: %.dvi
49 $(DVIPS) $< -o $@
50
51 version.texi: stamp-version; @:
52 stamp-version: $(..)config.make
53 echo '@set VERSION $(package-version)' > version.texi.new
54 $(move-if-change) version.texi.new version.texi
55 touch $@