maint: enable sc_prohibit_cloexec_without_use
[gnulib/ericb.git] / doc / Makefile
blob9118e1b24347d01deb3c913eb7660d5f78560a1c
1 # Makefile for gnulib doc.
2 # Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc.
4 # Copying and distribution of this file, with or without modification,
5 # are permitted in any medium without royalty provided the copyright
6 # notice and this notice are preserved.
8 doc = gnulib
10 lang_env = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE=
11 makeinfo_prog = makeinfo
12 MAKEINFO = $(lang_env) $(makeinfo_prog)
14 manual_opts = --no-split --reference-limit=2000
15 TEXI2HTML = $(MAKEINFO) $(manual_opts) --html
17 # Needed so that tex finds a recent enough texinfo.tex.
18 tex_opts = -I ../build-aux
20 %.info: %.texi
21 $(MAKEINFO) $(manual_opts) $<
23 %.html: %.texi
24 $(TEXI2HTML) -o $@ $<
26 %.dvi: %.texi
27 texi2dvi $(tex_opts) $< || { if texi2dvi $(tex_opts) $< 2>/dev/null | grep 'TeX capacity exceeded, sorry \[save size=' > /dev/null; then echo '*** You must increase the save_size in your texmf.cnf file, often located under /etc/texmf/.'; fi; exit 1; }
29 %.pdf: %.texi
30 texi2pdf $(tex_opts) $< || { if texi2pdf $(tex_opts) $< 2>/dev/null | grep 'TeX capacity exceeded, sorry \[save size=' > /dev/null; then echo '*** You must increase the save_size in your texmf.cnf file, often located under /etc/texmf/.'; fi; exit 1; }
32 all: info html dvi
33 info: $(doc).info
34 html: $(doc).html
35 dvi: $(doc).dvi
36 pdf: $(doc).pdf
38 INSTALL_PRELUDE = echo '@firstparagraphindent insert'
40 # INSTALL file with old ASCII quotation marks (looks ugly on modern machines).
41 INSTALL: install.texi
42 $(INSTALL_PRELUDE) | cat - $< > tmp.texi
43 $(MAKEINFO) --plaintext --no-validate tmp.texi > $@
44 rm -f tmp.texi
46 # INSTALL file with ISO 646 or ISO 8859 quotation marks.
47 INSTALL.ISO: install.texi
48 $(INSTALL_PRELUDE) | cat - $< > tmpi.texi
49 $(MAKEINFO) --plaintext --no-validate tmpi.texi \
50 | sed -e "s/\`\([^']*\)'/'\1'/g" > $@
51 rm -f tmpi.texi
53 # INSTALL file wit ISO 10646 (Unicode) quotation marks.
54 INSTALL.UTF-8: install.texi
55 $(INSTALL_PRELUDE) | cat - $< > tmpu.texi
56 $(MAKEINFO) --plaintext --no-validate tmpu.texi \
57 | sed -e "s/\`\([^']*\)'/‘\1’/g" > $@
58 rm -f tmpu.texi
60 GNULIB_TEXI_FILES = $(filter-out maintain.texi make-stds.texi standards.texi,$(wildcard *.texi)) $(wildcard posix-headers/*.texi) $(wildcard posix-functions/*.texi) $(wildcard glibc-headers/*.texi) $(wildcard glibc-functions/*.texi)
62 # Date of last update. Requires GNU date.
63 updated-stamp: $(GNULIB_TEXI_FILES)
64 date -u -r `ls -t $^ | sed 1q` +"@set UPDATED %F %T" > $@
66 # Dependencies. Search for @include to find them all.
67 gnulib.info gnulib.html gnulib.dvi gnulib.pdf: $(GNULIB_TEXI_FILES) updated-stamp
68 standards.info standards.html standards.dvi: standards.texi make-stds.texi fdl.texi
70 mostlyclean:
71 rm -f *.aux *.cn *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr *.vrs
72 rm -f updated-stamp
74 clean: mostlyclean
75 rm -f *.info *.html *.dvi *.ps *.pdf