1997-10-11 17:30:18 +00:00
|
|
|
# $Id: bsd.info.mk,v 1.43 1997/10/09 18:14:18 wosch Exp $
|
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.
|
|
|
|
# <bsd.info.mk> includes the files <bsd.dep.mk> and <bsd.obj.mk>.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# +++ variables +++
|
|
|
|
#
|
|
|
|
# CLEANFILES Additional files to remove for the clean and cleandir targets.
|
|
|
|
#
|
|
|
|
# DESTDIR Change the tree where the info files gets installed. [not set]
|
|
|
|
#
|
|
|
|
# DISTRIBUTION Name of distribution. [info]
|
|
|
|
#
|
1997-10-01 21:35:14 +00:00
|
|
|
# FORMATS Indicates which output formats will be generated
|
|
|
|
# (info, dvi, latin1, ps). [info]
|
|
|
|
#
|
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
|
|
|
#
|
|
|
|
# INFO ???
|
|
|
|
#
|
|
|
|
# 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}]
|
|
|
|
#
|
|
|
|
# INFOSECTION ??? [Miscellaneous]
|
|
|
|
#
|
1997-03-08 23:46:56 +00:00
|
|
|
# INFOTMPL ??? [${INFODIR}/dir-tmpl]
|
1997-01-12 16:20:13 +00:00
|
|
|
#
|
|
|
|
# INSTALLINFO ??? [install-info]
|
|
|
|
#
|
|
|
|
# INSTALLINFODIRS ???
|
|
|
|
#
|
|
|
|
# MAKEINFO A program for converting GNU Texinfo files into Info
|
|
|
|
# file. [makeinfo]
|
|
|
|
#
|
|
|
|
# MAKEINFOFLAGS Options for ${MAKEINFO} command. [--no-split]
|
|
|
|
#
|
|
|
|
# NOINFO Do not make or install info files. [not set]
|
|
|
|
#
|
|
|
|
# NOINFOCOMPRESS If you do not want info files be
|
|
|
|
# compressed when they are installed. [not set]
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# +++ targets +++
|
|
|
|
#
|
|
|
|
# depend:
|
|
|
|
# Dummy target, do nothing.
|
|
|
|
#
|
|
|
|
# distribute:
|
|
|
|
# This is a variant of install, which will
|
|
|
|
# put the stuff into the right "distribution".
|
|
|
|
#
|
|
|
|
# install:
|
|
|
|
# Install the info files.
|
|
|
|
#
|
|
|
|
# maninstall:
|
|
|
|
# Dummy target, do nothing.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# bsd.obj.mk: cleandir and obj
|
1995-01-12 08:20:25 +00:00
|
|
|
|
1997-04-07 16:46:40 +00:00
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
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
|
1997-03-08 23:46:56 +00:00
|
|
|
INFOTMPL?= ${INFODIR}/dir-tmpl
|
1997-01-11 02:39:37 +00:00
|
|
|
INSTALLINFO?= install-info
|
|
|
|
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
|
1995-01-02 12:12:00 +00:00
|
|
|
|
1995-01-07 16:39:38 +00:00
|
|
|
.MAIN: all
|
|
|
|
|
1997-10-01 21:35:14 +00:00
|
|
|
.SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1
|
1997-03-12 07:14:44 +00:00
|
|
|
|
1997-05-01 01:15:55 +00:00
|
|
|
# What to do if there's no dir file there. This is really gross!!!
|
|
|
|
${DESTDIR}${INFODIR}/${INFODIRFILE}:
|
|
|
|
@(cd /usr/src/share/info; make install)
|
|
|
|
|
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:
|
1997-10-01 21:35:14 +00:00
|
|
|
env TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
|
|
|
tex ${.IMPSRC} </dev/null
|
|
|
|
env TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
|
|
|
tex ${.IMPSRC} </dev/null
|
|
|
|
|
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
|
|
|
|
env TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
|
|
|
tex ${.IMPSRC:T:R}-la.texi </dev/null
|
|
|
|
env TEXINPUTS=${.CURDIR}:${SRCDIR}:$$TEXINPUTS \
|
|
|
|
tex ${.IMPSRC:T:R}-la.texi </dev/null
|
|
|
|
dvips -o /dev/stdout ${.IMPSRC:T:R}-la.dvi | \
|
|
|
|
dvips2ascii > ${.TARGET}.new
|
|
|
|
mv -f ${.TARGET}.new ${.TARGET}
|
|
|
|
|
1997-10-01 21:35:14 +00:00
|
|
|
.dvi.ps:
|
|
|
|
dvips -o ${.TARGET} ${.IMPSRC}
|
|
|
|
|
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}
|
|
|
|
IFILENS+= ${INFO:S/$/.${_f}/g}
|
|
|
|
.endfor
|
1995-01-02 12:12:00 +00:00
|
|
|
|
1997-01-11 10:51:36 +00:00
|
|
|
.if !defined(NOINFO)
|
1995-07-26 13:51:46 +00:00
|
|
|
.if !defined(NOINFOCOMPRESS)
|
1997-10-01 21:35:14 +00:00
|
|
|
.for _f in ${FORMATS}
|
|
|
|
IFILES+= ${INFO:S/$/.${_f}${ICOMPRESS_EXT}/g}
|
|
|
|
.endfor
|
1996-06-24 04:26:21 +00:00
|
|
|
all: ${IFILES} _SUBDIR
|
1995-07-26 13:51:46 +00:00
|
|
|
.else
|
1997-01-11 02:39:37 +00:00
|
|
|
IFILES= ${IFILENS}
|
1996-06-24 04:26:21 +00:00
|
|
|
all: ${IFILES} _SUBDIR
|
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-10-01 21:35:14 +00:00
|
|
|
.for _f in ${FORMATS}
|
|
|
|
.for x in ${INFO:S/$/.${_f}/g}
|
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
|
1997-10-01 21:35:14 +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/}
|
1997-01-13 23:44:20 +00:00
|
|
|
${x:S/$/-install/}: ${DESTDIR}${INFODIR}/${INFODIRFILE}
|
1997-01-11 02:39:37 +00:00
|
|
|
${INSTALLINFO} --defsection=${INFOSECTION} \
|
|
|
|
--defentry=${INFOENTRY_${x}} \
|
1997-01-12 07:15:24 +00:00
|
|
|
${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
|
1997-01-11 02:39:37 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.PHONY: ${INSTALLINFODIRS}
|
|
|
|
|
1995-02-11 05:28:31 +00:00
|
|
|
# The default is "info" and it can never be "bin"
|
1995-01-14 07:51:10 +00:00
|
|
|
DISTRIBUTION?= info
|
1995-02-11 05:28:31 +00:00
|
|
|
.if ${DISTRIBUTION} == "bin"
|
|
|
|
DISTRIBUTION= info
|
|
|
|
.endif
|
|
|
|
|
1995-01-12 08:20:25 +00:00
|
|
|
.if !target(distribute)
|
1996-06-24 04:26:21 +00:00
|
|
|
distribute: _SUBDIR
|
1997-06-21 15:40:34 +00:00
|
|
|
.for dist in ${DISTRIBUTION}
|
|
|
|
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies
|
|
|
|
.endfor
|
1995-01-12 08:20:25 +00:00
|
|
|
.endif
|
|
|
|
|
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
|
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
depend: _SUBDIR
|
1995-01-23 20:53:38 +00:00
|
|
|
@echo -n
|
1995-01-04 21:29:32 +00:00
|
|
|
|
1997-10-01 21:35:14 +00:00
|
|
|
.for _f in ${FORMATS}
|
1997-10-04 13:00:56 +00:00
|
|
|
CLEANFILES+=${INFO:S/$/.${_f}*/g} ${INFO:S/$/-la.${_f}*/g}
|
1997-10-01 21:35:14 +00:00
|
|
|
.endfor
|
1997-10-04 13:00:56 +00:00
|
|
|
CLEANFILES+= ${INFO:S/$/-la.texi/g}
|
|
|
|
|
|
|
|
# tex garbage
|
|
|
|
.for _f in aux cp fn ky log out pg toc tp vr dvi
|
|
|
|
CLEANFILES+= ${INFO:S/$/.${_f}/g} ${INFO:S/$/-la.${_f}/g}
|
|
|
|
.endfor
|
|
|
|
|
1995-01-04 21:29:32 +00:00
|
|
|
|
1997-01-12 07:30:23 +00:00
|
|
|
.if !defined(NOINFO) && defined(INFO)
|
1997-01-11 02:39:37 +00:00
|
|
|
install: ${INSTALLINFODIRS} _SUBDIR
|
1997-01-12 07:05:07 +00:00
|
|
|
${INSTALL} ${COPY} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
|
|
|
|
${IFILES} ${DESTDIR}${INFODIR}
|
1997-01-11 10:51:36 +00:00
|
|
|
.else
|
|
|
|
install:
|
|
|
|
.endif
|
1995-01-02 12:12:00 +00:00
|
|
|
|
1995-03-10 08:54:42 +00:00
|
|
|
.if !target(maninstall)
|
1996-06-24 04:26:21 +00:00
|
|
|
maninstall: _SUBDIR
|
1995-03-10 08:54:42 +00:00
|
|
|
.endif
|
1996-06-24 04:26:21 +00:00
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
|
|
|
.include <bsd.obj.mk>
|