1 # man.mk: Makefile fragment for web2c manual pages.
6 # The edited file always has extension .1; we change it when we install.
7 .SUFFIXES: .man .1 .txt .ps .dvi
9 sed -f sedscript $< >$@
11 $(DITROFF) -Tdvi -man $< >$@
13 $(DITROFF) -Tps -man $< >$@
15 $(DITROFF) -Tascii -man $< | col -b | expand >$@
20 $(manfiles): sedscript
23 dvi: $(manfiles:.1=.dvi)
24 ps: $(manfiles:.1=.ps)
25 txt: $(manfiles:.1=.txt)
27 # We do not depend on the top-level Makefile since the top-level
28 # Makefile can change for reasons that do not affect the man pages.
29 # At present, all but VERSION should be unused.
31 cp /dev/null sedscript
32 for f in $(kpathsea_dir)/paths.h; do \
33 sed -n -e '/^#define/s/#define[ ][ ]*\([A-Z_a-z][A-Z_a-z]*\)[ ][ ]*\(.*\)/s%@\1@%\2%/p' \
35 | sed -e 's/"//g' -e 's/[ ]*\/\*[^*]*\*\///g' >>sedscript;\
37 echo 's%@VERSION@%$(version)%' >>sedscript
38 echo 's%@BINDIR@%$(bindir)%' >>sedscript
39 echo 's%@INFODIR@%$(infodir)%' >>sedscript
40 echo 's%@TEXINPUTDIR@%$(texinputdir)%' >>sedscript
41 echo 's%@MFINPUTDIR@%$(mfinputdir)%' >>sedscript
42 echo 's%@MPINPUTDIR@%$(mpinputdir)%' >>sedscript
43 echo 's%@FONTDIR@%$(fontdir)%' >>sedscript
44 echo 's%@FMTDIR@%$(fmtdir)%' >>sedscript
45 echo 's%@BASEDIR@%$(basedir)%' >>sedscript
46 echo 's%@MEMDIR@%$(memdir)%' >>sedscript
47 echo 's%@TEXPOOLDIR@%$(texpooldir)%' >>sedscript
48 echo 's%@MFPOOLDIR@%$(mfpooldir)%' >>sedscript
49 echo 's%@MPPOOLDIR@%$(mppooldir)%' >>sedscript
50 echo 's%@FONTMAPDIR@%$(dvipsdir)%' >>sedscript
51 echo 's%@LOCALMODES@%$(localmodes)%' >>sedscript
54 $(top_srcdir)/../mkinstalldirs $(man1dir)
55 for nameone in $(manfiles); do \
56 name=`basename $${nameone} .1`; \
57 $(INSTALL_DATA) $${name}.1 $(man1dir)/$${name}.$(manext); \
61 for nameone in $(manfiles); do \
62 name=`basename $${nameone} .1`; \
63 rm -f $(man1dir)/$${name}.$(manext); \
66 install-data: install-man
67 uninstall-data: uninstall-man