1997-05-01 03:15:55 +02:00
|
|
|
# $Id: bsd.info.mk,v 1.38 1997/04/30 17:03:09 bde Exp $
|
1997-01-12 17:20:13 +01: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-03-09 00:46:56 +01:00
|
|
|
# ICOMPRESS_CMD Program to compress info files. Output is to
|
|
|
|
# stdout. [${COMPRESS_CMD}]
|
1997-01-12 17:20:13 +01: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-09 00:46:56 +01:00
|
|
|
# INFOTMPL ??? [${INFODIR}/dir-tmpl]
|
1997-01-12 17:20:13 +01: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 +++
|
|
|
|
#
|
|
|
|
# clean:
|
|
|
|
# remove *.info* Errs errs mklog ${CLEANFILES}
|
|
|
|
#
|
|
|
|
# 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 09:20:25 +01:00
|
|
|
|
1997-04-07 18:46:40 +02:00
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
1995-01-02 13:12:00 +01:00
|
|
|
MAKEINFO?= makeinfo
|
1996-02-08 19:27:07 +01:00
|
|
|
MAKEINFOFLAGS+= --no-split # simplify some things, e.g., compression
|
1997-01-12 08:05:07 +01:00
|
|
|
SRCDIR?= ${.CURDIR}
|
1997-01-11 03:39:37 +01:00
|
|
|
INFODIRFILE?= dir
|
1997-03-09 00:46:56 +01:00
|
|
|
INFOTMPL?= ${INFODIR}/dir-tmpl
|
1997-01-11 03:39:37 +01:00
|
|
|
INSTALLINFO?= install-info
|
|
|
|
INFOSECTION?= Miscellaneous
|
1997-03-12 07:24:52 +01:00
|
|
|
ICOMPRESS_CMD?= ${COMPRESS_CMD}
|
|
|
|
ICOMPRESS_EXT?= ${COMPRESS_EXT}
|
1995-01-02 13:12:00 +01:00
|
|
|
|
1995-01-07 17:39:38 +01:00
|
|
|
.MAIN: all
|
|
|
|
|
1997-03-09 00:46:56 +01:00
|
|
|
.SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo
|
1997-03-12 08:14:44 +01:00
|
|
|
|
1997-05-01 03:15:55 +02: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)
|
|
|
|
|
1995-01-02 13:12:00 +01:00
|
|
|
.texi.info:
|
1997-03-29 13:39:52 +01:00
|
|
|
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \
|
|
|
|
-o ${.TARGET}.new
|
1997-03-12 08:14:44 +01:00
|
|
|
mv -f ${.TARGET}.new ${.TARGET}
|
|
|
|
|
1995-01-04 22:29:32 +01:00
|
|
|
.texinfo.info:
|
1997-03-29 13:39:52 +01:00
|
|
|
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} ${.IMPSRC} \
|
|
|
|
-o ${.TARGET}.new
|
1997-03-12 08:14:44 +01:00
|
|
|
mv -f ${.TARGET}.new ${.TARGET}
|
1995-01-04 23:01:58 +01:00
|
|
|
|
1997-01-12 08:05:07 +01:00
|
|
|
.PATH: ${.CURDIR} ${SRCDIR}
|
1997-01-11 03:39:37 +01:00
|
|
|
|
|
|
|
IFILENS= ${INFO:S/$/.info/g}
|
1995-01-02 13:12:00 +01:00
|
|
|
|
1997-01-11 11:51:36 +01:00
|
|
|
.if !defined(NOINFO)
|
1995-07-26 15:51:46 +02:00
|
|
|
.if !defined(NOINFOCOMPRESS)
|
1997-03-09 00:46:56 +01:00
|
|
|
IFILES= ${INFO:S/$/.info${ICOMPRESS_EXT}/g}
|
1996-06-24 06:26:21 +02:00
|
|
|
all: ${IFILES} _SUBDIR
|
1995-07-26 15:51:46 +02:00
|
|
|
.else
|
1997-01-11 03:39:37 +01:00
|
|
|
IFILES= ${IFILENS}
|
1996-06-24 06:26:21 +02:00
|
|
|
all: ${IFILES} _SUBDIR
|
1995-07-26 15:51:46 +02:00
|
|
|
.endif
|
1997-01-11 11:51:36 +01:00
|
|
|
.else
|
|
|
|
all:
|
|
|
|
.endif
|
1995-07-26 15:51:46 +02:00
|
|
|
|
|
|
|
.for x in ${INFO:S/$/.info/g}
|
1997-03-09 00:46:56 +01:00
|
|
|
${x:S/$/${ICOMPRESS_EXT}/}: ${x}
|
|
|
|
${ICOMPRESS_CMD} ${.ALLSRC} > ${.TARGET}
|
1995-07-26 15:51:46 +02:00
|
|
|
.endfor
|
1995-01-04 23:01:58 +01:00
|
|
|
|
1997-01-11 03:39:37 +01:00
|
|
|
.for x in ${INFO}
|
|
|
|
INSTALLINFODIRS+= ${x:S/$/-install/}
|
1997-01-14 00:44:20 +01:00
|
|
|
${x:S/$/-install/}: ${DESTDIR}${INFODIR}/${INFODIRFILE}
|
1997-01-11 03:39:37 +01:00
|
|
|
${INSTALLINFO} --defsection=${INFOSECTION} \
|
|
|
|
--defentry=${INFOENTRY_${x}} \
|
1997-01-12 08:15:24 +01:00
|
|
|
${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
|
1997-01-11 03:39:37 +01:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.PHONY: ${INSTALLINFODIRS}
|
|
|
|
|
1995-02-11 06:28:31 +01:00
|
|
|
# The default is "info" and it can never be "bin"
|
1995-01-14 08:51:10 +01:00
|
|
|
DISTRIBUTION?= info
|
1995-02-11 06:28:31 +01:00
|
|
|
.if ${DISTRIBUTION} == "bin"
|
|
|
|
DISTRIBUTION= info
|
|
|
|
.endif
|
|
|
|
|
1995-01-12 09:20:25 +01:00
|
|
|
.if !target(distribute)
|
1996-06-24 06:26:21 +02:00
|
|
|
distribute: _SUBDIR
|
1997-03-29 13:39:52 +01:00
|
|
|
cd ${.CURDIR} ; \
|
|
|
|
$(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
1995-01-12 09:20:25 +01:00
|
|
|
.endif
|
|
|
|
|
1995-01-04 23:01:58 +01:00
|
|
|
.if defined(SRCS)
|
|
|
|
${INFO}.info: ${SRCS}
|
1997-03-29 13:39:52 +01:00
|
|
|
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} -I ${SRCDIR} \
|
|
|
|
${SRCS:S/^/${SRCDIR}\//g} -o ${INFO}.info.new
|
1997-03-12 08:14:44 +01:00
|
|
|
mv -f ${INFO}.info.new ${INFO}.info
|
1995-01-04 22:29:32 +01:00
|
|
|
.endif
|
|
|
|
|
1996-06-24 06:26:21 +02:00
|
|
|
depend: _SUBDIR
|
1995-01-23 21:53:38 +01:00
|
|
|
@echo -n
|
1995-01-04 22:29:32 +01:00
|
|
|
|
1996-06-24 06:26:21 +02:00
|
|
|
clean: _SUBDIR
|
1996-03-08 00:39:46 +01:00
|
|
|
rm -f ${INFO:S/$/.info*/g} Errs errs mklog ${CLEANFILES}
|
1995-01-04 22:29:32 +01:00
|
|
|
|
1997-01-12 08:30:23 +01:00
|
|
|
.if !defined(NOINFO) && defined(INFO)
|
1997-01-11 03:39:37 +01:00
|
|
|
install: ${INSTALLINFODIRS} _SUBDIR
|
1997-01-12 08:05:07 +01:00
|
|
|
${INSTALL} ${COPY} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
|
|
|
|
${IFILES} ${DESTDIR}${INFODIR}
|
1997-01-11 11:51:36 +01:00
|
|
|
.else
|
|
|
|
install:
|
|
|
|
.endif
|
1995-01-02 13:12:00 +01:00
|
|
|
|
1995-03-10 09:54:42 +01:00
|
|
|
.if !target(maninstall)
|
1996-06-24 06:26:21 +02:00
|
|
|
maninstall: _SUBDIR
|
1995-03-10 09:54:42 +01:00
|
|
|
.endif
|
1996-06-24 06:26:21 +02:00
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
|
|
|
.include <bsd.obj.mk>
|