yield: Implement for OS/2 kLIBC.
[gnulib.git] / doc / Makefile
blobc2c922efdeb736872f83a8fb61f5524aa4301ceb
1 # Makefile for gnulib doc. -*- coding: utf-8 -*-
2 # Copyright (C) 2004, 2006-2021 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 OMIT_TRAILING_EMPTY_LINES = /^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x
42 # INSTALL file with directed ASCII quotation marks.
43 INSTALL: install.texi
44 $(INSTALL_PRELUDE) | cat - $< > tmp.texi
45 $(MAKEINFO) --plaintext --no-validate tmp.texi \
46 | sed -e '$(OMIT_TRAILING_EMPTY_LINES)' > $@
47 rm -f tmp.texi
49 # INSTALL file with ISO 646 or ISO 8859 quotation marks.
50 INSTALL.ISO: INSTALL
51 sed -e "s/\`\([^']*\)'/'\1'/g" $< > $@
53 # INSTALL file with ISO 10646 (Unicode) quotation marks.
54 INSTALL.UTF-8: INSTALL
55 sed -e "s/\`\([^']*\)'/‘\1’/g" $< > $@
57 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)
58 NEWEST_GNULIB_TEXI_FILE = $(shell ls -t $(GNULIB_TEXI_FILES) | sed 1q)
60 # Date of last update. Requires GNU date.
61 updated-stamp: $(GNULIB_TEXI_FILES)
62 date -u -r $(NEWEST_GNULIB_TEXI_FILE) +"@set UPDATED %F %T" > $@
64 # Dependencies. Search for @include to find them all.
65 gnulib.info gnulib.html gnulib.dvi gnulib.pdf: $(GNULIB_TEXI_FILES) updated-stamp
66 standards.info standards.html standards.dvi: standards.texi make-stds.texi fdl.texi
68 mostlyclean:
69 rm -f *.aux *.cn *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr *.vrs
70 rm -f updated-stamp
72 clean: mostlyclean
73 rm -f *.info *.html *.dvi *.ps *.pdf