Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.

Supported values:
    0	Minimal output ("quiet")
    1	Describe what is occurring
    2	Describe what is occurring and echo the actual command ("verbose")
	This is the default, and is equivalent to the previous behaviour.
This commit is contained in:
lukem 2003-10-18 15:33:59 +00:00
parent 459d14eddf
commit 03b6213598
11 changed files with 234 additions and 22 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.140 2003/09/29 01:06:37 lukem Exp $
# $NetBSD: bsd.README,v 1.141 2003/10/18 15:33:59 lukem Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the new make "include" files for the BSD
@ -90,6 +90,14 @@ BUILD If defined, 'make install' checks that the targets in the
are out of date, instead of blindly trying to install
out of date or non-existent targets.
MAKEVERBOSE Control how "verbose" the standard make(1) rules are.
Default: 2
Supported values:
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command
MKBFD If "no", don't build libbfd, libiberty, or any of the things
that depend on them (binutils/gas/ld, gdb, dbsym, mdsetimage).
Default: yes

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.dep.mk,v 1.57 2003/08/11 09:59:43 lukem Exp $
# $NetBSD: bsd.dep.mk,v 1.58 2003/10/18 15:33:59 lukem Exp $
##### Basic targets
.PHONY: cleandepend
@ -29,24 +29,35 @@ ${__DPSRCS.d}: ${__DPSRCS.notd} ${DPSRCS}
.endif # }
.depend: ${__DPSRCS.d}
@rm -f .depend
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
rm -f .depend
${_MKCMD}\
cat ${__DPSRCS.d} /dev/null > .depend
.SUFFIXES: .d .s .S .c .C .cc .cpp .cxx .m
.c.d:
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
${MKDEP} -f ${.TARGET} ${MKDEPFLAGS} ${CFLAGS:M-[ID]*} ${CPPFLAGS} \
${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
.m.d:
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
${MKDEP} -f ${.TARGET} ${MKDEPFLAGS} ${OBJCFLAGS:M-[ID]*} \
${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
.s.d .S.d:
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
${MKDEP} -f ${.TARGET} ${MKDEPFLAGS} ${AFLAGS:M-[ID]*} ${CPPFLAGS} \
${CPPFLAGS.${.IMPSRC:T}} ${__acpp_flags} ${AINC} ${.IMPSRC}
.C.d .cc.d .cpp.d .cxx.d:
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
${MKDEP} -f ${.TARGET} ${MKDEPFLAGS} ${CXXFLAGS:M-[ID]*} \
${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} \
${DESTDIR}/usr/include/g++} \
@ -57,6 +68,7 @@ ${__DPSRCS.d}: ${__DPSRCS.notd} ${DPSRCS}
##### Clean rules
cleandepend:
.if defined(SRCS)
${_MKCMD}\
rm -f .depend ${__DPSRCS.d} ${.CURDIR}/tags ${CLEANDEPEND}
.endif
@ -64,6 +76,7 @@ cleandepend:
.if !target(tags)
tags: ${SRCS}
.if defined(SRCS)
${_MKCMD}\
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
sed "s;\${.CURDIR}/;;" > tags
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.files.mk,v 1.24 2003/09/20 06:20:41 lukem Exp $
# $NetBSD: bsd.files.mk,v 1.25 2003/10/18 15:33:59 lukem Exp $
.if !defined(_BSD_FILES_MK_)
_BSD_FILES_MK_=1
@ -63,7 +63,10 @@ filesinstall:: ${_F}
BUILDSYMLINKS.s+= ${_SL}
BUILDSYMLINKS.t+= ${_TL}
${_TL}: ${_SL}
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
rm -f ${.TARGET}
${_MKCMD}\
ln -s ${.ALLSRC} ${.TARGET}
.endfor
@ -72,6 +75,7 @@ realall: ${BUILDSYMLINKS.t}
.PHONY: cleanbuildsymlinks
cleandir: cleanbuildsymlinks
cleanbuildsymlinks:
${_MKCMD}\
rm -f ${BUILDSYMLINKS.t}
.endif # }

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.hostlib.mk,v 1.7 2003/08/01 17:04:01 lukem Exp $
# $NetBSD: bsd.hostlib.mk,v 1.8 2003/10/18 15:33:59 lukem Exp $
.include <bsd.init.mk>
.include <bsd.sys.mk>
@ -35,15 +35,20 @@ OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.lo/g}
${OBJS}: ${DPSRCS}
lib${HOSTLIB}.a: ${OBJS} ${DPADD}
-rm -f ${.TARGET}
${_MKMSG} " build ${.TARGET}"
${_MKCMD}\
rm -f ${.TARGET}
${_MKCMD}\
${HOST_AR} cq ${.TARGET} ${OBJS}
@${HOST_RANLIB} ${.TARGET}
${_MKCMD}\
${HOST_RANLIB} ${.TARGET}
.endif # defined(OBJS) && !empty(OBJS)
realall: lib${HOSTLIB}.a
cleanlib:
${_MKCMD}\
rm -f a.out [Ee]rrs mklog core *.core \
lib${HOSTLIB}.a ${OBJS} ${CLEANFILES}

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.hostprog.mk,v 1.32 2003/08/01 17:04:01 lukem Exp $
# $NetBSD: bsd.hostprog.mk,v 1.33 2003/10/18 15:33:59 lukem Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.include <bsd.init.mk>
@ -76,6 +76,8 @@ LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
${OBJS} ${LOBJS}: ${DPSRCS}
${HOSTPROG}: ${OBJS} ${DPADD}
${_MKMSG} " link ${HOSTPROG}"
${_MKCMD}\
${HOST_LINK.c} ${HOST_LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
.endif # defined(OBJS) && !empty(OBJS)
@ -88,6 +90,7 @@ MAN= ${HOSTPROG}.1
realall: ${HOSTPROG}
cleanprog:
${_MKCMD}\
rm -f a.out [Ee]rrs mklog core *.core \
${HOSTPROG} ${OBJS} ${LOBJS} ${CLEANFILES}
@ -105,6 +108,7 @@ afterdepend: .depend
lint: ${LOBJS}
.if defined(LOBJS) && !empty(LOBJS)
${_MKCMD}\
${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.info.mk,v 1.32 2003/07/27 09:27:18 lukem Exp $
# $NetBSD: bsd.info.mk,v 1.33 2003/10/18 15:33:59 lukem Exp $
.include <bsd.init.mk>
@ -35,6 +35,8 @@ INFODIRFILE=${DESTDIR}${INFODIR}/dir
# serialize access to ${INFODIRFILE}; needed for parallel makes
__infoinstall: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} \
-o ${INFOOWN_${.ALLSRC:T}:U${INFOOWN}} \
-g ${INFOGRP_${.ALLSRC:T}:U${INFOGRP}} \
@ -79,6 +81,7 @@ CLEANFILES+= ${INFOFILES}
cleaninfo:
.if !empty(CLEANFILES)
${_MKCMD}\
rm -f ${CLEANFILES}
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.lib.mk,v 1.235 2003/09/30 07:24:23 lukem Exp $
# $NetBSD: bsd.lib.mk,v 1.236 2003/10/18 15:33:59 lukem Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@ -171,132 +171,207 @@ CFLAGS+= ${COPTS}
FFLAGS+= ${FOPTS}
.c.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.c.po:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -X -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.c.so:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.c.ln:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${CPPFLAGS.${.IMPSRC:T}:M-[-IDU]*} -i ${.IMPSRC}
.cc.o .cpp.o .cxx.o .C.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.cc.po .cpp.po .cxx.o .C.po:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -X -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.cc.so .cpp.so .cxx.so .C.so:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(COPTS) && !empty(COPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.f.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.f} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(FOPTS) && !empty(FOPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.f.po:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.f} -pg ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(FOPTS) && !empty(FOPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -X -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.f.so:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(FOPTS) && !empty(FOPTS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.f.ln:
${_MKMSG} "compile ${.TARGET}"
@echo Skipping lint for Fortran libraries.
.m.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.m.po:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -X -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.m.so:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.m} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp
.if defined(OBJCFLAGS) && !empty(OBJCFLAGS:M*-g*)
${_MKCMD}\
mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.endif
.S.o .s.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.tmp
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.S.po .s.po:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.tmp
${_MKCMD}\
${LD} -X -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.S.so .s.so:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.tmp
${_MKCMD}\
${LD} -x -r ${.TARGET}.tmp -o ${.TARGET}
${_MKCMD}\
rm -f ${.TARGET}.tmp
.if defined(LIB)
@ -359,15 +434,23 @@ SOBJS=
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
__archivebuild: .USE
@rm -f ${.TARGET}
${_MKMSG} " build ${.TARGET}"
${_MKCMD}\
rm -f ${.TARGET}
${_MKCMD}\
${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
${_MKCMD}\
${RANLIB} ${.TARGET}
__archiveinstall: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${UPDATE:D:U-a "${RANLIB} -t"} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
__archivesymlinkpic: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
@ -377,13 +460,10 @@ CLEANFILES+= ${YHEADER:D${SRCS:M*.y:.y=.h}}
${OBJS} ${POBJS} ${SOBJS} ${LOBJS}: ${DPSRCS}
lib${LIB}.a:: ${OBJS} __archivebuild
@echo building standard ${LIB} library
lib${LIB}_p.a:: ${POBJS} __archivebuild
@echo building profiled ${LIB} library
lib${LIB}_pic.a:: ${SOBJS} __archivebuild
@echo building shared object ${LIB} library
_LIBLDOPTS=
@ -398,9 +478,11 @@ _LIBLDOPTS+= -Wl,-rpath-link,${DESTDIR}${SHLIBINSTALLDIR}:${DESTDIR}/usr/lib \
lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
@echo building shared ${LIB} library \(version ${SHLIB_FULLVERSION}\)
@rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
${_MKMSG} " build ${.TARGET}"
${_MKCMD}\
rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
.if defined(DESTDIR)
${_MKCMD}\
${CC} -Wl,-nostdlib -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/ \
${_LIBLDOPTS} \
-Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
@ -408,6 +490,7 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
-Wl,--no-whole-archive ${LDADD} \
-L${_GCC_LIBGCCDIR}
.else
${_MKCMD}\
${CC} -Wl,-x -shared ${SHLIB_SHFLAGS} ${LDFLAGS} -o ${.TARGET} \
${_LIBLDOPTS} \
-Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD}
@ -416,30 +499,43 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
# We don't use INSTALL_SYMLINK here because this is just
# happening inside the build directory/objdir. XXX Why does
# this spend so much effort on libraries that aren't live??? XXX
${_MKCMD}\
ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
${_MKCMD}\
mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
${_MKCMD}\
ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
${_MKCMD}\
mv -f lib${LIB}.so.tmp lib${LIB}.so
.endif
.if !empty(LOBJS)
LLIBS?= -lc
llib-l${LIB}.ln: ${LOBJS}
@echo building llib-l${LIB}.ln
@rm -f llib-l${LIB}.ln
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
rm -f llib-l${LIB}.ln
.if defined(DESTDIR)
${_MKCMD}\
${LINT} -C${LIB} ${.ALLSRC} -L${DESTDIR}/usr/libdata ${LLIBS}
.else
${_MKCMD}\
${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
.endif
.endif
cleanlib:
${_MKCMD}\
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
${_MKCMD}\
rm -f lib${LIB}.a ${OBJS}
${_MKCMD}\
rm -f lib${LIB}_p.a ${POBJS}
${_MKCMD}\
rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
${_MKCMD}\
rm -f ${OBJS:=.tmp} ${POBJS:=.tmp} ${SOBJS:=.tmp}
${_MKCMD}\
rm -f llib-l${LIB}.ln ${LOBJS}
.if defined(SRCS)
@ -528,30 +624,38 @@ ${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: .MADE
.endif
${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION}: lib${LIB}.so.${SHLIB_FULLVERSION}
.endif
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
.if ${_LIBSODIR} != ${LIBDIR}
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} \
${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_FULLVERSION}
.endif
.if ${OBJECT_FMT} == "a.out" && !defined(DESTDIR)
${_MKCMD}\
/sbin/ldconfig -m ${_LIBSODIR} ${LIBDIR}
.endif
.if ${OBJECT_FMT} == "ELF"
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} \
lib${LIB}.so.${SHLIB_FULLVERSION} \
${DESTDIR}${_LIBSODIR}/lib${LIB}.so.${SHLIB_MAJOR}
.if ${_LIBSODIR} != ${LIBDIR}
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} \
${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
.endif
.if ${MKLINKLIB} != "no"
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} \
lib${LIB}.so.${SHLIB_FULLVERSION} \
${DESTDIR}${_LIBSODIR}/lib${LIB}.so
.if ${_LIBSODIR} != ${LIBDIR}
${_MKCMD}\
${INSTALL_SYMLINK} ${SYSPKGTAG} \
${_LIBSODIR}/lib${LIB}.so.${SHLIB_FULLVERSION} \
${DESTDIR}${LIBDIR}/lib${LIB}.so
@ -575,6 +679,8 @@ ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
.endif
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
.endif
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${SYSPKGTAG} ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.man.mk,v 1.84 2003/09/03 05:40:12 lukem Exp $
# $NetBSD: bsd.man.mk,v 1.85 2003/10/18 15:33:59 lukem Exp $
# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
.include <bsd.init.mk>
@ -44,6 +44,7 @@ MANCOMPRESS:= | ${MANCOMPRESS}
.endif
__installpage: .USE
# XXX_MKMSG
@cmp -s ${.ALLSRC} ${.TARGET} > /dev/null 2>&1 || \
(echo "${INSTALL_FILE} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
${SYSPKGDOCTAG} ${.ALLSRC} ${.TARGET}" && \
@ -63,6 +64,7 @@ realall: ${MANPAGES}
.SUFFIXES: ${_MNUMBERS:@N@.$N${MANSUFFIX}@}
${_MNUMBERS:@N@.$N.$N${MANSUFFIX}@}: # build rule
${_MKCMD}\
cat ${.IMPSRC} ${MANCOMPRESS} > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
.endif # !empty(MANSUFFIX)
@ -117,10 +119,13 @@ realall: ${CATPAGES}
.MADE: ${HTMLDEPS}
${_MNUMBERS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS} # build rule
${_MKMSG} " format ${.TARGET}"
.if defined(USETBL)
${_MKCMD}\
${TOOL_TBL} ${.IMPSRC} | ${TOOL_ROFF_ASCII} -mandoc ${MANCOMPRESS} \
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
.else
${_MKCMD}\
${TOOL_ROFF_ASCII} -mandoc ${.IMPSRC} ${MANCOMPRESS} \
> ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}
.endif
@ -174,6 +179,8 @@ html: ${HTMLPAGES}
.SUFFIXES: ${_MNUMBERS:@N@.html$N@}
${_MNUMBERS:@N@.$N.html$N@}: ${HTMLDEPS} # build rule
${_MKMSG} " format ${.TARGET}"
${_MKCMD}\
${TOOL_ROFF_HTML} ${.IMPSRC} > ${.TARGET}.tmp && \
mv ${.TARGET}.tmp ${.TARGET}
@ -198,6 +205,7 @@ htmlpages:: ${_F}
.endfor
cleanhtml:
${_MKCMD}\
rm -f ${HTMLPAGES}
.endif # }
@ -208,9 +216,11 @@ cleandir: cleanman
cleanman:
.if !empty(MAN) && (${MKMAN} != "no")
.if (${MKCATPAGES} != "no")
${_MKCMD}\
rm -f ${CATPAGES}
.endif
.if !empty(MANSUFFIX)
${_MKCMD}\
rm -f ${MANPAGES} ${CATPAGES:S/${MANSUFFIX}$//}
.endif
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.nls.mk,v 1.41 2003/07/18 08:26:08 lukem Exp $
# $NetBSD: bsd.nls.mk,v 1.42 2003/10/18 15:33:59 lukem Exp $
.include <bsd.init.mk>
@ -24,6 +24,8 @@ realall: ${NLSALL}
.msg.cat:
@rm -f ${.TARGET}
${_MKMSG} " create ${.TARGET}"
${_MKCMD}\
${TOOL_GENCAT} ${.TARGET} ${.IMPSRC}
.endif # ${MKNLS} != "no"
@ -33,6 +35,8 @@ nlsinstall:: # ensure existence
.if ${MKNLS} != "no"
__nlsinstall: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} \
${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
@ -61,6 +65,7 @@ nlsinstall:: ${_F}
##### Clean rules
cleannls:
.if ${MKNLS} != "no" && !empty(NLS)
${_MKCMD}\
rm -f ${NLSALL}
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.prog.mk,v 1.189 2003/09/29 01:06:37 lukem Exp $
# $NetBSD: bsd.prog.mk,v 1.190 2003/10/18 15:33:59 lukem Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.ifndef HOSTPROG
@ -161,13 +161,17 @@ _CCLINK= ${CC}
.endif
.gdbinit:
${_MKCMD}\
rm -f .gdbinit
.if defined(DESTDIR) && !empty(DESTDIR)
${_MKCMD}\
echo "set solib-absolute-prefix ${DESTDIR}" > .gdbinit
.else
${_MKCMD}\
touch .gdbinit
.endif
.for __gdbinit in ${GDBINIT}
${_MKCMD}\
echo "source ${__gdbinit}" >> .gdbinit
.endfor
@ -175,14 +179,18 @@ ${OBJS} ${LOBJS}: ${DPSRCS}
${PROG}: .gdbinit ${LIBCRT0} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
.if !commands(${PROG})
${_MKMSG} " link ${PROG}"
.if defined(DESTDIR)
${_MKCMD}\
${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib ${_PROGLDOPTS} ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib ${_SUPCXX} -lgcc -lc -lgcc ${LIBCRTEND}
.else
${_MKCMD}\
${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${OBJS} ${LDADD}
.endif # defined(DESTDIR)
.endif # !commands(${PROG})
${PROG}.ro: ${OBJS} ${DPADD}
${_MKCMD}\
${LD} -r -dc -o ${.TARGET} ${OBJS}
.endif # defined(OBJS) && !empty(OBJS)
@ -195,15 +203,18 @@ MAN= ${PROG}.1
realall: ${PROG} ${SCRIPTS}
cleanprog: cleanobjs cleanextra
${_MKCMD}\
rm -f a.out [Ee]rrs mklog core *.core .gdbinit ${PROG}
cleanobjs:
.if defined(OBJS) && !empty(OBJS)
${_MKCMD}\
rm -f ${OBJS} ${LOBJS}
.endif
cleanextra:
.if defined(CLEANFILES) && !empty(CLEANFILES)
${_MKCMD}\
rm -f ${CLEANFILES}
.endif
@ -222,6 +233,8 @@ proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
.PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}
__proginstall: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${STRIPFLAG} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET}
@ -252,6 +265,8 @@ scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRI
.PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
__scriptinstall: .USE
${_MKMSG} "install ${.TARGET}"
${_MKCMD}\
${INSTALL_FILE} \
-o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
-g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
@ -279,6 +294,7 @@ scriptsinstall::
lint: ${LOBJS}
.if defined(LOBJS) && !empty(LOBJS)
${_MKCMD}\
${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
.endif

View File

@ -1,10 +1,23 @@
# $NetBSD: bsd.sys.mk,v 1.95 2003/08/22 18:07:21 christos Exp $
# $NetBSD: bsd.sys.mk,v 1.96 2003/10/18 15:33:59 lukem Exp $
#
# Build definitions used for NetBSD source tree builds.
.if !defined(_BSD_SYS_MK_)
_BSD_SYS_MK_=1
MAKEVERBOSE?= 2
.if ${MAKEVERBOSE} == 0
_MKMSG= @\#
_MKCMD= @
.elif ${MAKEVERBOSE} == 1
_MKMSG= @echo ' '
_MKCMD= @
.else # MAKEVERBOSE == 2 ?
_MKMSG= @echo '\# '
_MKCMD=
.endif
.if defined(WARNS)
.if ${WARNS} > 0
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
@ -138,25 +151,38 @@ TOOL_ZIC?= zic
# C
.c:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${LINK.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.c.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
.c.ln:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${CPPFLAGS.${.IMPSRC:T}:M-[IDU]*} -i ${.IMPSRC}
# Objective C
# (Defined here rather than in <sys.mk> because `.m' is not just
# used for Objective C source)
.m:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
.m.o:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${COMPILE.m} ${.IMPSRC}
# Host-compiled C objects
# The intermediate step is necessary for Sun CC, which objects to calling
# object files anything but *.o
.c.lo:
${_MKMSG} "compile ${.TARGET}"
${_MKCMD}\
${HOST_COMPILE.c} -o ${.TARGET}.o ${.IMPSRC}
${_MKCMD}\
mv ${.TARGET}.o ${.TARGET}
# Lex
@ -165,10 +191,16 @@ LFLAGS+= -P${LPREFIX}
.l.o: # remove to force use of .l.c->.c.o transforms
.l:
${_MKMSG} " lex ${.TARGET}"
${_MKCMD}\
${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC}
${_MKCMD}\
${LINK.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}}-o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll
${_MKCMD}\
rm -f ${.TARGET:R}.${LPREFIX}.c
.l.c:
${_MKMSG} " lex ${.TARGET}"
${_MKCMD}\
${LEX.l} -o${.TARGET} ${.IMPSRC}
# Yacc
@ -176,10 +208,16 @@ YFLAGS+= ${YPREFIX:D-p${YPREFIX}} ${YHEADER:D-d}
.y.o: # remove to force use of .y.c->.c.o transforms
.y:
${_MKMSG} " yacc ${.TARGET}"
${_MKCMD}\
${YACC.y} -b ${.TARGET:R} ${.IMPSRC}
${_MKCMD}\
${LINK.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}}-o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
${_MKCMD}\
rm -f ${.TARGET:R}.tab.[ch]
.y.c:
${_MKMSG} " yacc ${.TARGET}"
${_MKCMD}\
${YACC.y} -o ${.TARGET} ${.IMPSRC}
.ifdef YHEADER