mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
make install' do not depend on
make all'
Add some comments for variables and targets. Include <bsd.obj.mk>, remove targets obj, clean, cleandir. Replace ${MAN*} with ${DOC*} variables. Use a .for loop for undefined targets
This commit is contained in:
parent
5233f1c6ed
commit
187f8e98f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15950
@ -1,7 +1,50 @@
|
|||||||
# bsd.sgml.mk - 8 Sep 1995 John Fieber
|
# bsd.sgml.mk - 8 Sep 1995 John Fieber
|
||||||
# This file is in the public domain.
|
# This file is in the public domain.
|
||||||
#
|
#
|
||||||
# $Id: bsd.sgml.mk,v 1.3 1995/09/10 21:49:24 jfieber Exp $
|
# $Id: bsd.sgml.mk,v 1.7 1996/04/29 15:59:01 wosch Exp $
|
||||||
|
#
|
||||||
|
# The include file <bsd.sgml.mk> handles installing sgml documents.
|
||||||
|
# <bsd.prog.mk> includes the file named "../Makefile.inc" if it exists,
|
||||||
|
# as well as the include file <bsd.obj.mk>.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# +++ variables +++
|
||||||
|
#
|
||||||
|
# DISTRIBUTION Name of distribution. [doc]
|
||||||
|
#
|
||||||
|
# FORMATS Indicates which output formats will be generated
|
||||||
|
# (ascii, html, latex, nroff). [ascii html]
|
||||||
|
#
|
||||||
|
# LPR Printer command. [lpr]
|
||||||
|
#
|
||||||
|
# SGMLFLAGS Flags to sgmlfmt. [${SGMLOPTS}]
|
||||||
|
#
|
||||||
|
# SGMLFMT Format sgml files command. [sgmlfmt]
|
||||||
|
#
|
||||||
|
# Variables DOCOWN, DOCGRP, DOCMODE, DOCDIR, DESTDIR, DISTDIR are
|
||||||
|
# set by other Makefiles (e.g. bsd.own.mk)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# +++ targets +++
|
||||||
|
#
|
||||||
|
# all:
|
||||||
|
# Converts sgml files to the specified output format
|
||||||
|
# (see ${FORMATS}).
|
||||||
|
#
|
||||||
|
# distribute:
|
||||||
|
# This is a variant of install, which will
|
||||||
|
# put the stuff into the right "distribution".
|
||||||
|
#
|
||||||
|
# install:
|
||||||
|
# Install formated output.
|
||||||
|
#
|
||||||
|
# print:
|
||||||
|
# Print formated output.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# bsd.obj.mk: clean, cleandir, obj
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
.if exists(${.CURDIR}/../Makefile.inc)
|
.if exists(${.CURDIR}/../Makefile.inc)
|
||||||
.include "${.CURDIR}/../Makefile.inc"
|
.include "${.CURDIR}/../Makefile.inc"
|
||||||
@ -17,7 +60,6 @@ SGMLFLAGS+= ${SGMLOPTS}
|
|||||||
|
|
||||||
VOLUME?= ${.CURDIR:T}
|
VOLUME?= ${.CURDIR:T}
|
||||||
DOC?= ${.CURDIR:T}
|
DOC?= ${.CURDIR:T}
|
||||||
BINDIR?= /usr/share/doc
|
|
||||||
SRCDIR?= ${.CURDIR}
|
SRCDIR?= ${.CURDIR}
|
||||||
DISTRIBUTION?= doc
|
DISTRIBUTION?= doc
|
||||||
SGMLFMT?= sgmlfmt
|
SGMLFMT?= sgmlfmt
|
||||||
@ -33,43 +75,8 @@ all: ${DOCS}
|
|||||||
${DOC}. install- print- clean-:
|
${DOC}. install- print- clean-:
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(obj)
|
|
||||||
.if defined(NOOBJ)
|
|
||||||
obj:
|
|
||||||
.else
|
|
||||||
obj:
|
|
||||||
@cd ${.CURDIR}; rm -f obj; \
|
|
||||||
here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
|
|
||||||
${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
|
|
||||||
if test -d /usr/obj -a ! -d $$dest; then \
|
|
||||||
mkdir -p $$dest; \
|
|
||||||
else \
|
|
||||||
true; \
|
|
||||||
fi;
|
|
||||||
.endif
|
|
||||||
.endif
|
|
||||||
|
|
||||||
clean: ${FORMATS:S/^/clean-/g}
|
|
||||||
rm -f Errs errs mklog
|
|
||||||
|
|
||||||
cleandir: clean
|
|
||||||
cd ${.CURDIR}; rm -rf obj
|
|
||||||
|
|
||||||
install: beforeinstall realinstall afterinstall
|
install: beforeinstall realinstall afterinstall
|
||||||
|
|
||||||
.if !target(beforeinstall)
|
|
||||||
beforeinstall:
|
|
||||||
|
|
||||||
.endif
|
|
||||||
.if !target(afterinstall)
|
|
||||||
afterinstall:
|
|
||||||
|
|
||||||
.endif
|
|
||||||
.if !target(maninstall)
|
|
||||||
maninstall:
|
|
||||||
|
|
||||||
.endif
|
|
||||||
|
|
||||||
realinstall: ${FORMATS:S/^/install-/g}
|
realinstall: ${FORMATS:S/^/install-/g}
|
||||||
|
|
||||||
.if !target(print)
|
.if !target(print)
|
||||||
@ -86,12 +93,6 @@ distribute:
|
|||||||
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(depend)
|
|
||||||
depend:
|
|
||||||
|
|
||||||
.endif
|
|
||||||
|
|
||||||
|
|
||||||
# For each FORMATS type, define a build, install, clean and print target.
|
# For each FORMATS type, define a build, install, clean and print target.
|
||||||
# Note that there is special case handling for html targets
|
# Note that there is special case handling for html targets
|
||||||
# because the number of files generated is generally not possible
|
# because the number of files generated is generally not possible
|
||||||
@ -118,14 +119,14 @@ print-${_FORMAT}: ${DOC}.${_FORMAT}
|
|||||||
|
|
||||||
.if !target(install-${_FORMAT})
|
.if !target(install-${_FORMAT})
|
||||||
.if ${_FORMAT} == "html"
|
.if ${_FORMAT} == "html"
|
||||||
install-${_FORMAT}: ${DOC}.${_FORMAT}
|
install-${_FORMAT}:
|
||||||
${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
|
${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
|
||||||
*.${.TARGET:S/install-//} ${DESTDIR}${BINDIR}/${VOLUME}
|
*.${.TARGET:S/install-//} ${DESTDIR}${DOCDIR}/${VOLUME}
|
||||||
|
|
||||||
.else
|
.else
|
||||||
install-${_FORMAT}: ${DOC}.${_FORMAT}
|
install-${_FORMAT}:
|
||||||
${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
|
${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
|
||||||
${DOC}.${.TARGET:S/install-//} ${DESTDIR}${BINDIR}/${VOLUME}
|
${DOC}.${.TARGET:S/install-//} ${DESTDIR}${DOCDIR}/${VOLUME}
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
@ -136,16 +137,19 @@ ${DOC}.${_FORMAT}: ${SRCS}
|
|||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(clean-${_FORMAT})
|
|
||||||
.if ${_FORMAT} == "html"
|
.if ${_FORMAT} == "html"
|
||||||
clean-${_FORMAT}:
|
CLEANFILES+= *.html
|
||||||
rm -f *.${.TARGET:S/clean-//}
|
|
||||||
|
|
||||||
.else
|
.else
|
||||||
clean-${_FORMAT}:
|
CLEANFILES+= ${DOC}.${_FORMAT}
|
||||||
rm -f ${DOC}.${.TARGET:S/clean-//}
|
|
||||||
|
|
||||||
.endif
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
|
.for __target in beforeinstall afterinstall maninstall depend _SUBDIRUSE
|
||||||
|
.if !target(__target)
|
||||||
|
${__target}:
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.include <bsd.obj.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user