Add variable INSTALLFLAGS_EDIT used to remove arbitrary INSTALLFLAGS.

Specifically intended for removing -fschg ("INSTALLFLAGS_EDIT=:S/schg/uchg/")
this makes the NOFSCHG flag redundant.  NOFSCHG will still be honoured by
bsd.lib.mk but is valid for buildworld only.  NOFSCHG is still implemented in
the old way (ie. _not_ ".if NOFSCHG then { INSTALLFLAGS_EDIT+=:S/schg/,/ }"
to emphasize the fact that NOFSCHG is only supported in a limited
fashion and for buildworld.

The interface and implementation are such that future use of flags such
as sappnd can also be easily removed or altered (perhaps to uappnd).

This commit brought to you by the letters B, D, and E, and the numbers six,
one, thirteen, and three.
This commit is contained in:
Tim Vanderhoek 1999-07-31 20:27:33 +00:00
parent 022090a693
commit e902c1bb07
4 changed files with 35 additions and 11 deletions

View File

@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
# $Id: bsd.kmod.mk,v 1.60 1999/04/20 14:33:24 peter Exp $
# $Id: bsd.kmod.mk,v 1.61 1999/04/23 20:53:34 peter Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
#
@ -197,9 +197,14 @@ beforeinstall:
afterinstall:
.endif
_INSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
realinstall: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
.if defined(LINKS) && !empty(LINKS)
@set ${LINKS}; \
while test $$# -ge 2; do \

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
# $Id: bsd.lib.mk,v 1.86 1999/03/23 03:06:25 bde Exp $
# $Id: bsd.lib.mk,v 1.87 1999/06/24 22:50:19 jmg Exp $
#
.if !target(__initialized__)
@ -266,18 +266,27 @@ beforeinstall:
SHLINSTALLFLAGS+= -fschg
.endif
_INSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
_SHLINSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT}
_SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}}
.endfor
realinstall: beforeinstall
.if !defined(INTERNALLIB)
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
.if !defined(NOPROFILE)
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
.endif
.endif
.if defined(SHLIB_NAME)
${INSTALL} ${COPY} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} ${SHLINSTALLFLAGS} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
.if defined(SHLIB_LINK)
ln -sf ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
@ -285,7 +294,7 @@ realinstall: beforeinstall
.endif
.if defined(INSTALL_PIC_ARCHIVE)
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
.endif
.if defined(LINKS) && !empty(LINKS)
@set ${LINKS}; \

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
# $Id: bsd.prog.mk,v 1.82 1999/03/23 03:06:25 bde Exp $
# $Id: bsd.prog.mk,v 1.83 1999/05/06 02:58:30 bde Exp $
.if !target(__initialized__)
__initialized__:
@ -84,10 +84,15 @@ _EXTRADEPEND:
beforeinstall:
.endif
_INSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
realinstall: beforeinstall
.if defined(PROG)
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
.endif
.if defined(HIDEGAME)
(cd ${DESTDIR}/${GBINDIR}; rm -f ${PROG}; ln -s dm ${PROG}; \

View File

@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
# $Id: bsd.kmod.mk,v 1.60 1999/04/20 14:33:24 peter Exp $
# $Id: bsd.kmod.mk,v 1.61 1999/04/23 20:53:34 peter Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
#
@ -197,9 +197,14 @@ beforeinstall:
afterinstall:
.endif
_INSTALLFLAGS:= ${INSTALLFLAGS}
.for ie in ${INSTALLFLAGS_EDIT}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
realinstall: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
.if defined(LINKS) && !empty(LINKS)
@set ${LINKS}; \
while test $$# -ge 2; do \