1 # Makefile for gnulib doc. -*- coding: utf-8 -*-
2 # Copyright (C) 2004, 2006-2018 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.
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
21 $(MAKEINFO
) $(manual_opts
) $<
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; }
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; }
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.
44 $(INSTALL_PRELUDE
) | cat
- $< > tmp.texi
45 $(MAKEINFO
) --plaintext
--no-validate tmp.texi \
46 | sed
-e
'$(OMIT_TRAILING_EMPTY_LINES)' > $@
49 # INSTALL file with ISO 646 or ISO 8859 quotation marks.
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
69 rm -f
*.aux
*.cn
*.cp
*.cps
*.fn
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
*.vrs
73 rm -f
*.
info *.html
*.
dvi *.ps
*.pdf