Two changes to aid in cleaning up sys/boot/ makefiles:

- Don't put libc.a as a dependency if program is linked with -nostdlib.

- Added INTERNALPROG (by analogy to INTERNALLIB) for programs which are
  built only for its side effect and shold not be installed.
This commit is contained in:
ru 2004-02-09 14:05:17 +00:00
parent 73e0d07606
commit 8a63ecf0e9

View File

@ -96,13 +96,21 @@ CLEANFILES+= ${PROG}
CLEANFILES+= ${OBJS}
.endif
.include <bsd.libnames.mk>
.if defined(PROG)
_EXTRADEPEND:
.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
.if defined(DPADD) && !empty(DPADD)
echo ${PROG}: ${DPADD} >> ${DEPENDFILE}
.endif
.else
echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
.if defined(PROG_CXX)
echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
.endif
.endif
.endif
.if !target(install)
@ -111,7 +119,7 @@ _INSTALLFLAGS:= ${INSTALLFLAGS}
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
.if !target(realinstall)
.if !target(realinstall) && !defined(INTERNALPROG)
realinstall: _proginstall
.ORDER: beforeinstall _proginstall
_proginstall:
@ -179,8 +187,6 @@ lint: ${SRCS:M*.c}
.include <bsd.man.mk>
.endif
.include <bsd.libnames.mk>
.include <bsd.dep.mk>
.if defined(PROG) && !exists(${.OBJDIR}/${DEPENDFILE})