1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
|
|
|
# The include file <bsd.info.mk> handles installing GNU (tech)info files.
|
|
|
|
# Texinfo is a documentation system that uses a single source
|
|
|
|
# file to produce both on-line information and printed output.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# +++ variables +++
|
|
|
|
#
|
|
|
|
# CLEANFILES Additional files to remove for the clean and cleandir targets.
|
|
|
|
#
|
|
|
|
# DESTDIR Change the tree where the info files gets installed. [not set]
|
|
|
|
#
|
1997-10-12 18:54:34 +00:00
|
|
|
# DVIPS A program which convert a TeX DVI file to PostScript [dvips]
|
|
|
|
#
|
|
|
|
# DVIPS2ASCII A program to convert a PostScript file which was prior
|
|
|
|
# converted from a TeX DVI file to ascii/latin1 [dvips2ascii]
|
|
|
|
#
|
1997-10-01 21:35:14 +00:00
|
|
|
# FORMATS Indicates which output formats will be generated
|
1997-10-12 18:54:34 +00:00
|
|
|
# (info, dvi, latin1, ps, html). [info]
|
1997-10-01 21:35:14 +00:00
|
|
|
#
|
1997-03-08 23:46:56 +00:00
|
|
|
# ICOMPRESS_CMD Program to compress info files. Output is to
|
|
|
|
# stdout. [${COMPRESS_CMD}]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
2005-01-06 11:12:43 +00:00
|
|
|
# INFO texinfo files, without suffix. [set in Makefile]
|
1997-10-12 18:54:34 +00:00
|
|
|
#
|
|
|
|
# INFO2HTML A program for converting GNU info files into HTML files
|
|
|
|
# [info2html]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
|
|
|
# INFODIR Base path for GNU's hypertext system
|
|
|
|
# called Info (see info(1)). [${SHAREDIR}/info]
|
|
|
|
#
|
|
|
|
# INFODIRFILE Top level node/index for info files. [dir]
|
|
|
|
#
|
|
|
|
# INFOGRP Info group. [${SHAREGRP}]
|
|
|
|
#
|
|
|
|
# INFOMODE Info mode. [${NOBINMODE}]
|
|
|
|
#
|
|
|
|
# INFOOWN Info owner. [${SHAREOWN}]
|
|
|
|
#
|
2000-01-24 16:11:19 +00:00
|
|
|
# INFOSECTION Default section (if one could not be found in
|
|
|
|
# the Info file). [Miscellaneous]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
2000-01-24 16:11:19 +00:00
|
|
|
# INSTALLINFO A program for installing directory entries from Info
|
|
|
|
# file in the ${INFODIR}/${INFODIRFILE}. [install-info]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
2000-01-24 16:11:19 +00:00
|
|
|
# INSTALLINFOFLAGS Options for ${INSTALLINFO} command. [--quiet]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
|
|
|
# INSTALLINFODIRS ???
|
|
|
|
#
|
|
|
|
# MAKEINFO A program for converting GNU Texinfo files into Info
|
|
|
|
# file. [makeinfo]
|
|
|
|
#
|
|
|
|
# MAKEINFOFLAGS Options for ${MAKEINFO} command. [--no-split]
|
|
|
|
#
|
2004-12-21 09:33:47 +00:00
|
|
|
# NO_INFO Do not make or install info files. [not set]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
2004-12-21 09:33:47 +00:00
|
|
|
# NO_INFOCOMPRESS If you do not want info files be
|
1997-01-12 16:20:13 +00:00
|
|
|
# compressed when they are installed. [not set]
|
|
|
|
#
|
1997-10-12 18:54:34 +00:00
|
|
|
# TEX A program for converting tex files into dvi files [tex]
|
|
|
|
#
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
|
|
|
# +++ targets +++
|
|
|
|
#
|
|
|
|
# install:
|
|
|
|
# Install the info files.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# bsd.obj.mk: cleandir and obj
|
1995-01-12 08:20:25 +00:00
|
|
|
|
2002-04-17 13:49:29 +00:00
|
|
|
.include <bsd.init.mk>
|
1997-04-07 16:46:40 +00:00
|
|
|
|
1995-01-02 12:12:00 +00:00
|
|
|
MAKEINFO?= makeinfo
|
1996-02-08 18:27:07 +00:00
|
|
|
MAKEINFOFLAGS+= --no-split # simplify some things, e.g., compression
|
1997-01-12 07:05:07 +00:00
|
|
|
SRCDIR?= ${.CURDIR}
|
1997-01-11 02:39:37 +00:00
|
|
|
INFODIRFILE?= dir
|
|
|
|
INSTALLINFO?= install-info
|
2000-01-24 16:11:19 +00:00
|
|
|
INSTALLINFOFLAGS+=--quiet
|
1997-01-11 02:39:37 +00:00
|
|
|
INFOSECTION?= Miscellaneous
|
1997-03-12 06:24:52 +00:00
|
|
|
ICOMPRESS_CMD?= ${COMPRESS_CMD}
|
|
|
|
ICOMPRESS_EXT?= ${COMPRESS_EXT}
|
1997-10-01 21:35:14 +00:00
|
|
|
FORMATS?= info
|
1997-10-12 18:54:34 +00:00
|
|
|
INFO2HTML?= info2html
|
|
|
|
TEX?= tex
|
|
|
|
DVIPS?= dvips
|
|
|
|
DVIPS2ASCII?= dvips2ascii
|
1995-01-02 12:12:00 +00:00
|
|
|
|
1997-10-12 18:54:34 +00:00
|
|
|
.SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html
|
1997-03-12 07:14:44 +00:00
|
|
|
|
1997-10-04 13:00:56 +00:00
|
|
|
.texi.info .texinfo.info:
|
1997-03-29 12:39:52 +00:00
|
|
|
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \
|
1997-10-11 17:30:18 +00:00
|
|
|
-o ${.TARGET}
|
1997-03-12 07:14:44 +00:00
|
|
|
|
1997-10-04 13:00:56 +00:00
|
|
|
.texi.dvi .texinfo.dvi:
|
2002-03-19 06:11:43 +00:00
|
|
|
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
1997-10-12 18:54:34 +00:00
|
|
|
${TEX} ${.IMPSRC} </dev/null
|
2003-05-21 12:58:28 +00:00
|
|
|
# Run again to resolve cross references.
|
2002-03-19 06:11:43 +00:00
|
|
|
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
1997-10-12 18:54:34 +00:00
|
|
|
${TEX} ${.IMPSRC} </dev/null
|
1997-10-01 21:35:14 +00:00
|
|
|
|
1997-10-04 13:00:56 +00:00
|
|
|
.texinfo.latin1 .texi.latin1:
|
|
|
|
perl -npe 's/(^\s*\\input\s+texinfo\s+)/$$1\n@tex\n\\global\\hsize=120mm\n@end tex\n\n/' ${.IMPSRC} >> ${.IMPSRC:T:R}-la.texi
|
2002-03-19 06:11:43 +00:00
|
|
|
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
1997-10-12 18:54:34 +00:00
|
|
|
${TEX} ${.IMPSRC:T:R}-la.texi </dev/null
|
2003-05-21 12:58:28 +00:00
|
|
|
# Run again to resolve cross references.
|
2002-03-19 06:11:43 +00:00
|
|
|
TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
1997-10-12 18:54:34 +00:00
|
|
|
${TEX} ${.IMPSRC:T:R}-la.texi </dev/null
|
|
|
|
${DVIPS} -o /dev/stdout ${.IMPSRC:T:R}-la.dvi | \
|
|
|
|
${DVIPS2ASCII} > ${.TARGET}.new
|
1997-10-04 13:00:56 +00:00
|
|
|
mv -f ${.TARGET}.new ${.TARGET}
|
|
|
|
|
1997-10-01 21:35:14 +00:00
|
|
|
.dvi.ps:
|
1997-10-12 18:54:34 +00:00
|
|
|
${DVIPS} -o ${.TARGET} ${.IMPSRC}
|
|
|
|
|
|
|
|
.info.html:
|
|
|
|
${INFO2HTML} ${.IMPSRC}
|
2005-01-06 11:12:43 +00:00
|
|
|
ln -f ${.TARGET:R}.info.Top.html ${.TARGET}
|
1997-10-01 21:35:14 +00:00
|
|
|
|
1997-01-12 07:05:07 +00:00
|
|
|
.PATH: ${.CURDIR} ${SRCDIR}
|
1997-01-11 02:39:37 +00:00
|
|
|
|
1997-10-01 21:35:14 +00:00
|
|
|
.for _f in ${FORMATS}
|
1997-12-16 18:29:48 +00:00
|
|
|
IFILENS+= ${INFO:S/$/.${_f}/}
|
1997-10-01 21:35:14 +00:00
|
|
|
.endfor
|
1995-01-02 12:12:00 +00:00
|
|
|
|
2004-12-21 09:33:47 +00:00
|
|
|
.if !defined(NO_INFO)
|
1997-12-16 18:29:48 +00:00
|
|
|
CLEANFILES+= ${IFILENS}
|
2004-12-21 09:33:47 +00:00
|
|
|
.if !defined(NO_INFOCOMPRESS)
|
1997-12-16 18:29:48 +00:00
|
|
|
CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/}
|
|
|
|
IFILES= ${IFILENS:S/$/${ICOMPRESS_EXT}/:S/.html${ICOMPRESS_EXT}/.html/}
|
2002-04-23 09:03:56 +00:00
|
|
|
all: ${IFILES}
|
1995-07-26 13:51:46 +00:00
|
|
|
.else
|
1997-01-11 02:39:37 +00:00
|
|
|
IFILES= ${IFILENS}
|
2002-04-23 09:03:56 +00:00
|
|
|
all: ${IFILES}
|
1995-07-26 13:51:46 +00:00
|
|
|
.endif
|
1997-01-11 10:51:36 +00:00
|
|
|
.else
|
|
|
|
all:
|
|
|
|
.endif
|
1995-07-26 13:51:46 +00:00
|
|
|
|
1997-12-16 18:29:48 +00:00
|
|
|
.for x in ${IFILENS}
|
1997-03-08 23:46:56 +00:00
|
|
|
${x:S/$/${ICOMPRESS_EXT}/}: ${x}
|
|
|
|
${ICOMPRESS_CMD} ${.ALLSRC} > ${.TARGET}
|
1995-07-26 13:51:46 +00:00
|
|
|
.endfor
|
1995-01-04 22:01:58 +00:00
|
|
|
|
1997-01-11 02:39:37 +00:00
|
|
|
.for x in ${INFO}
|
|
|
|
INSTALLINFODIRS+= ${x:S/$/-install/}
|
2002-07-06 14:58:20 +00:00
|
|
|
${x:S/$/-install/}:
|
2000-01-24 16:11:19 +00:00
|
|
|
${INSTALLINFO} ${INSTALLINFOFLAGS} \
|
|
|
|
--defsection=${INFOSECTION} \
|
|
|
|
--defentry=${INFOENTRY_${x}} \
|
1999-01-30 14:28:10 +00:00
|
|
|
${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
|
1997-01-11 02:39:37 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.PHONY: ${INSTALLINFODIRS}
|
|
|
|
|
1995-01-04 22:01:58 +00:00
|
|
|
.if defined(SRCS)
|
1997-10-01 21:35:14 +00:00
|
|
|
CLEANFILES+= ${INFO}.texi
|
|
|
|
${INFO}.texi: ${SRCS}
|
1997-10-09 18:14:18 +00:00
|
|
|
cat ${.ALLSRC} > ${.TARGET}
|
1995-01-04 21:29:32 +00:00
|
|
|
.endif
|
|
|
|
|
1997-10-04 13:00:56 +00:00
|
|
|
# tex garbage
|
2004-01-27 23:22:15 +00:00
|
|
|
.if !empty(FORMATS:Mps) || !empty(FORMATS:Mdvi) || !empty(FORMATS:Mlatin1)
|
1997-10-04 13:00:56 +00:00
|
|
|
.for _f in aux cp fn ky log out pg toc tp vr dvi
|
1997-12-16 18:29:48 +00:00
|
|
|
CLEANFILES+= ${INFO:S/$/.${_f}/} ${INFO:S/$/-la.${_f}/}
|
1997-10-04 13:00:56 +00:00
|
|
|
.endfor
|
1997-12-16 18:29:48 +00:00
|
|
|
CLEANFILES+= ${INFO:S/$/-la.texi/}
|
1997-10-12 18:54:34 +00:00
|
|
|
.endif
|
|
|
|
|
2004-01-27 23:22:15 +00:00
|
|
|
.if !empty(FORMATS:Mhtml)
|
1997-12-16 18:29:48 +00:00
|
|
|
CLEANFILES+= ${INFO:S/$/.info.*.html/} ${INFO:S/$/.info/}
|
1997-10-12 18:54:34 +00:00
|
|
|
.endif
|
1997-10-04 13:00:56 +00:00
|
|
|
|
2004-12-21 09:33:47 +00:00
|
|
|
.if !defined(NO_INFO) && defined(INFO)
|
2002-04-23 09:03:56 +00:00
|
|
|
install: ${INSTALLINFODIRS}
|
2004-01-27 23:22:15 +00:00
|
|
|
.if !empty(IFILES:N*.html)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
|
1997-10-12 18:54:34 +00:00
|
|
|
${IFILES:N*.html} ${DESTDIR}${INFODIR}
|
|
|
|
.endif
|
2004-01-27 23:22:15 +00:00
|
|
|
.if !empty(FORMATS:Mhtml)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
|
1997-12-16 18:29:48 +00:00
|
|
|
${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}
|
1997-10-12 18:54:34 +00:00
|
|
|
.endif
|
1997-01-11 10:51:36 +00:00
|
|
|
.else
|
2000-05-15 14:17:50 +00:00
|
|
|
# The indirection in the following is to avoid the null install rule
|
|
|
|
# "install:" from being overridden by the implicit .sh rule if there
|
|
|
|
# happens to be a source file named install.sh. This assumes that there
|
|
|
|
# is no source file named __null_install.sh.
|
|
|
|
install: __null_install
|
|
|
|
__null_install:
|
1997-01-11 10:51:36 +00:00
|
|
|
.endif
|
1995-01-02 12:12:00 +00:00
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
.include <bsd.obj.mk>
|