luatex 1.0.3 (the last round, we hope)
[luatex.git] / source / am / man.am
blobbd598ac75a752befc50558b2bd4d4de583c343c2
1 ## am/man.am: Makefile fragment for kpathsea and web2c manual pages.
2 ##
3 ## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
5 ##
6 ## requires $(man_sources)
7 ## requires $(KPATHSEA_PATHS_H) giving the directory of kpathsea/paths.h
9 SUFFIXES = .1 .man .ps .dvi
11 .man.1:
12         $(AM_V_GEN)sed -f sedscript $< >$@
13 man_files = $(man_sources:.man=.1)
14 $(man_files): sedscript
16 nodist_man1_MANS = $(man_files)
18 # At present, all but VERSION should be unused.
19 sedscript: $(KPATHSEA_PATHS_H)/kpathsea/paths.h
20         $(AM_V_GEN)( \
21           sed -n -e '/^#define/s/#define[       ][      ]*\([A-Z_a-z][A-Z_a-z]*\)[      ][      ]*\(.*\)/s%@\1@%\2%/p' \
22                 $(KPATHSEA_PATHS_H)/kpathsea/paths.h \
23             | sed -e 's/"//g' -e 's/[   ]*\/\*[^*]*\*\///g'; \
24           echo 's%@VER''SION@%$(VERSION)%'; \
25           echo 's%@BINDIR@%$(bindir)%'; \
26           echo 's%@INFODIR@%$(infodir)%'; \
27           echo 's%@TEXINPUTDIR@%$(texinputdir)%'; \
28           echo 's%@MFINPUTDIR@%$(mfinputdir)%'; \
29           echo 's%@MPINPUTDIR@%$(mpinputdir)%'; \
30           echo 's%@FONTDIR@%$(fontdir)%'; \
31           echo 's%@FMTDIR@%$(fmtdir)%'; \
32           echo 's%@BASEDIR@%$(basedir)%'; \
33           echo 's%@MEMDIR@%$(memdir)%'; \
34           echo 's%@TEXPOOLDIR@%$(texpooldir)%'; \
35           echo 's%@MFPOOLDIR@%$(mfpooldir)%'; \
36           echo 's%@MPPOOLDIR@%$(mppooldir)%'; \
37           echo 's%@FONTMAPDIR@%$(dvipsdir)%'; \
38           echo 's%@LOCALMODES@%$(localmodes)%') >sedscript
40 DITROFF = groff
42 .1.dvi:
43         $(DITROFF) -Tdvi -man $< >$@
44 DVIS = $(man_files:.1=.dvi)
46 .1.ps:
47         $(DITROFF) -Tps -man $< >$@
48 PSS = $(man_files:.1=.ps)
50 DISTCLEANFILES = sedscript $(man_files) $(DVIS) $(PSS)
52 ## end of texk/am/man.am