Add '-q' to maketars and makesrctars, to quieten them.
Improve MAKEVERBOSE support.
This commit is contained in:
parent
1e8f8a64e7
commit
6c8d08d4c7
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.56 2007/03/10 20:34:57 apb Exp $
|
# $NetBSD: Makefile,v 1.57 2008/03/16 07:02:22 lukem Exp $
|
||||||
|
|
||||||
# The `all' target must appear before bsd.own.mk is pulled in.
|
# The `all' target must appear before bsd.own.mk is pulled in.
|
||||||
all:
|
all:
|
||||||
@ -22,6 +22,7 @@ SETSCMD= cd ${.CURDIR} && \
|
|||||||
TSORT=${TSORT:Q} \
|
TSORT=${TSORT:Q} \
|
||||||
${HOST_SH}
|
${HOST_SH}
|
||||||
|
|
||||||
|
MAKETARS_FLAGS=
|
||||||
.if ${MKX11} != "no"
|
.if ${MKX11} != "no"
|
||||||
MAKEFLIST_FLAGS= -b
|
MAKEFLIST_FLAGS= -b
|
||||||
MAKESRCTARS_FLAGS= -x ${X11SRCDIR} -N ${NETBSDSRCDIR}/etc
|
MAKESRCTARS_FLAGS= -x ${X11SRCDIR} -N ${NETBSDSRCDIR}/etc
|
||||||
@ -30,6 +31,11 @@ MAKEFLIST_FLAGS=
|
|||||||
MAKESRCTARS_FLAGS= -N ${NETBSDSRCDIR}/etc
|
MAKESRCTARS_FLAGS= -N ${NETBSDSRCDIR}/etc
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${MAKEVERBOSE} != 2
|
||||||
|
MAKETARS_FLAGS+= -q
|
||||||
|
MAKESRCTARS_FLAGS+= -q
|
||||||
|
.endif
|
||||||
|
|
||||||
.if !defined(MAKETARSETS)
|
.if !defined(MAKETARSETS)
|
||||||
MAKETARSETS!= ${SETSCMD} ./makeflist -l ${MAKEFLIST_FLAGS}
|
MAKETARSETS!= ${SETSCMD} ./makeflist -l ${MAKEFLIST_FLAGS}
|
||||||
.endif
|
.endif
|
||||||
@ -125,11 +131,13 @@ maketarsetup: .EXEC
|
|||||||
makesetfiles: .PHONY
|
makesetfiles: .PHONY
|
||||||
${_MKMSG_CREATE} "set lists"
|
${_MKMSG_CREATE} "set lists"
|
||||||
${SETSCMD} ./maketars -S -d ${DESTDIR:S,^$,/,} ${METALOG.unpriv} \
|
${SETSCMD} ./maketars -S -d ${DESTDIR:S,^$,/,} ${METALOG.unpriv} \
|
||||||
|
${MAKETARS_FLAGS} \
|
||||||
-N ${NETBSDSRCDIR}/etc ${MAKEFLIST_FLAGS} -t ${TARDIR}
|
-N ${NETBSDSRCDIR}/etc ${MAKEFLIST_FLAGS} -t ${TARDIR}
|
||||||
|
|
||||||
.for tar in ${MAKETARSETS}
|
.for tar in ${MAKETARSETS}
|
||||||
do-${tar}: .PHONY sanitise_METALOG
|
do-${tar}: .PHONY sanitise_METALOG
|
||||||
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} \
|
${_MKMSG_CREATE} "${tar}.tgz"
|
||||||
|
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} ${MAKETARS_FLAGS} \
|
||||||
${METALOG.sanitised.unpriv} \
|
${METALOG.sanitised.unpriv} \
|
||||||
-N ${NETBSDSRCDIR}/etc -t ${TARDIR} ${tar} \
|
-N ${NETBSDSRCDIR}/etc -t ${TARDIR} ${tar} \
|
||||||
|| rm -f ${TARDIR}/${tar}.tgz
|
|| rm -f ${TARDIR}/${tar}.tgz
|
||||||
@ -137,6 +145,7 @@ do-${tar}: .PHONY sanitise_METALOG
|
|||||||
|
|
||||||
|
|
||||||
makesrctars: .PRECIOUS .PHONY check_RELEASEDIR
|
makesrctars: .PRECIOUS .PHONY check_RELEASEDIR
|
||||||
|
${_MKMSG_CREATE} "source tar files"
|
||||||
mkdir -p ${SOURCETARDIR}
|
mkdir -p ${SOURCETARDIR}
|
||||||
${SETSCMD} ./makesrctars ${MAKESRCTARS_FLAGS} \
|
${SETSCMD} ./makesrctars ${MAKESRCTARS_FLAGS} \
|
||||||
${NETBSDSRCDIR} ${SOURCETARDIR}
|
${NETBSDSRCDIR} ${SOURCETARDIR}
|
||||||
@ -150,6 +159,7 @@ makesums: .PRECIOUS .PHONY check_RELEASEDIR .WAIT \
|
|||||||
|
|
||||||
.for tar in ${MAKETARSETS}
|
.for tar in ${MAKETARSETS}
|
||||||
do-sum-${tar}: .PHONY do-${tar}
|
do-sum-${tar}: .PHONY do-${tar}
|
||||||
|
${_MKMSG_CREATE} "${tar} checksums"
|
||||||
${MAKESUMS} -t ${TARDIR} ${tar}.tgz
|
${MAKESUMS} -t ${TARDIR} ${tar}.tgz
|
||||||
for i in BSDSUM CKSUM MD5 SHA512 SYSVSUM; do \
|
for i in BSDSUM CKSUM MD5 SHA512 SYSVSUM; do \
|
||||||
${TOOL_CAT} ${TARDIR}/$$i >> ${TARDIR}/$$i.tmp; \
|
${TOOL_CAT} ${TARDIR}/$$i >> ${TARDIR}/$$i.tmp; \
|
||||||
@ -163,7 +173,7 @@ installsets: .PHONY check_DESTDIR sanitise_METALOG
|
|||||||
@echo "setenv INSTALLDIR before doing that!"
|
@echo "setenv INSTALLDIR before doing that!"
|
||||||
@false
|
@false
|
||||||
.endif
|
.endif
|
||||||
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} \
|
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} ${MAKETARS_FLAGS} \
|
||||||
${METALOG.sanitised.unpriv} -N ${NETBSDSRCDIR}/etc \
|
${METALOG.sanitised.unpriv} -N ${NETBSDSRCDIR}/etc \
|
||||||
${MAKEFLIST_FLAGS} -i ${INSTALLDIR} ${INSTALLSETS}
|
${MAKEFLIST_FLAGS} -i ${INSTALLDIR} ${INSTALLSETS}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# $NetBSD: makesrctars,v 1.33 2007/03/23 02:57:30 jnemeth Exp $
|
# $NetBSD: makesrctars,v 1.34 2008/03/16 07:02:22 lukem Exp $
|
||||||
#
|
#
|
||||||
# makesrctars srcdir setdir
|
# makesrctars srcdir setdir
|
||||||
# Create source tarballs in setdir from the source under srcdir.
|
# Create source tarballs in setdir from the source under srcdir.
|
||||||
@ -12,6 +12,7 @@ rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
|
|||||||
|
|
||||||
# set defaults
|
# set defaults
|
||||||
xsrcdir=
|
xsrcdir=
|
||||||
|
quiet=false
|
||||||
|
|
||||||
GZIP=-9
|
GZIP=-9
|
||||||
export GZIP
|
export GZIP
|
||||||
@ -19,9 +20,10 @@ export GZIP
|
|||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
cat 1>&2 <<USAGE
|
cat 1>&2 <<USAGE
|
||||||
Usage: ${prog} [-N password/group dir] [-x xsrcdir] srcdir setdir
|
Usage: ${prog} [-N password/group dir] [-q] [-x xsrcdir] srcdir setdir
|
||||||
-N dir location which contains master.passwd and group files
|
-N dir location which contains master.passwd and group files
|
||||||
(defaults to \${srcdir}/etc)
|
(defaults to \${srcdir}/etc)
|
||||||
|
-q quiet operation
|
||||||
-x xsrcdir build xsrc.tgz from xsrcdir
|
-x xsrcdir build xsrc.tgz from xsrcdir
|
||||||
srcdir location of sources
|
srcdir location of sources
|
||||||
setdir where to write the .tgz files to
|
setdir where to write the .tgz files to
|
||||||
@ -29,9 +31,18 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msg()
|
||||||
|
{
|
||||||
|
$quiet || echo $*
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# handle args
|
# handle args
|
||||||
while getopts N:x: ch; do
|
while getopts N:qx: ch; do
|
||||||
case ${ch} in
|
case ${ch} in
|
||||||
|
q)
|
||||||
|
quiet=true
|
||||||
|
;;
|
||||||
x)
|
x)
|
||||||
xsrcdir="${OPTARG}"
|
xsrcdir="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
@ -53,7 +64,7 @@ setdir="$2"
|
|||||||
: ${PASSWD:="${srcdir}/etc"}
|
: ${PASSWD:="${srcdir}/etc"}
|
||||||
|
|
||||||
if [ ! -d "${setdir}" ]; then
|
if [ ! -d "${setdir}" ]; then
|
||||||
echo "${setdir} is not a directory"
|
echo >&2 "${prog}: ${setdir} is not a directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -64,7 +75,7 @@ makeset()
|
|||||||
dir="$1"
|
dir="$1"
|
||||||
shift
|
shift
|
||||||
intmp="/tmp/in$$"
|
intmp="/tmp/in$$"
|
||||||
echo "Creating ${set}"
|
msg "Creating ${set}"
|
||||||
if [ "${dir}" != "." ]; then
|
if [ "${dir}" != "." ]; then
|
||||||
cd "${dir}"
|
cd "${dir}"
|
||||||
srcprefix="${srcprefix}/${dir}"
|
srcprefix="${srcprefix}/${dir}"
|
||||||
@ -93,7 +104,7 @@ makeset()
|
|||||||
#
|
#
|
||||||
|
|
||||||
if ! cd "${srcdir}"; then
|
if ! cd "${srcdir}"; then
|
||||||
echo "Can't chdir to ${srcdir}"
|
echo >&2 "${prog}: can't chdir to ${srcdir}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -113,7 +124,7 @@ makeset sharesrc share
|
|||||||
#
|
#
|
||||||
if [ -n "${xsrcdir}" ]; then
|
if [ -n "${xsrcdir}" ]; then
|
||||||
if ! cd "${xsrcdir}"; then
|
if ! cd "${xsrcdir}"; then
|
||||||
echo "Can't chdir to ${xsrcdir}"
|
echo >&2 "${prog}: can't chdir to ${xsrcdir}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
srcprefix=usr/xsrc
|
srcprefix=usr/xsrc
|
||||||
@ -121,7 +132,7 @@ if [ -n "${xsrcdir}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Creating checksum files"
|
msg "Creating checksum files"
|
||||||
(cd "${setdir}"
|
(cd "${setdir}"
|
||||||
${CKSUM} -o1 *.tgz > BSDSUM
|
${CKSUM} -o1 *.tgz > BSDSUM
|
||||||
${CKSUM} *.tgz > CKSUM
|
${CKSUM} *.tgz > CKSUM
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# $NetBSD: maketars,v 1.63 2008/03/16 04:39:19 lukem Exp $
|
# $NetBSD: maketars,v 1.64 2008/03/16 07:02:22 lukem Exp $
|
||||||
#
|
#
|
||||||
# Make release tar files for some or all lists. Usage:
|
# Make release tar files for some or all lists. Usage:
|
||||||
# maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
|
# maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
|
||||||
@ -26,6 +26,7 @@ metalog=
|
|||||||
installdir=
|
installdir=
|
||||||
etcdir=
|
etcdir=
|
||||||
setfilesonly=false
|
setfilesonly=false
|
||||||
|
quiet=false
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -38,6 +39,7 @@ Usage: ${prog} [-b] [-x] [-i idir] [-a arch] [-m machine] [-s setsdir] [-S]
|
|||||||
-i idir Install sets to idir instead of creating tar files
|
-i idir Install sets to idir instead of creating tar files
|
||||||
-a arch Set arch (e.g, m68k, mipseb, mipsel, powerpc) [${MACHINE_ARCH}]
|
-a arch Set arch (e.g, m68k, mipseb, mipsel, powerpc) [${MACHINE_ARCH}]
|
||||||
-m machine Set machine (e.g, amiga, i386, macppc) [${MACHINE}]
|
-m machine Set machine (e.g, amiga, i386, macppc) [${MACHINE}]
|
||||||
|
-q Quiet operation
|
||||||
-s setsdir Directory to find sets [${setsdir}]
|
-s setsdir Directory to find sets [${setsdir}]
|
||||||
-S Exit after creating set files ${dest}/etc/mtree/set.*
|
-S Exit after creating set files ${dest}/etc/mtree/set.*
|
||||||
-M metalog metalog file
|
-M metalog metalog file
|
||||||
@ -49,8 +51,13 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msg()
|
||||||
|
{
|
||||||
|
$quiet || echo $*
|
||||||
|
}
|
||||||
|
|
||||||
# handle args
|
# handle args
|
||||||
while getopts bxi:a:m:s:SM:N:d:t: ch; do
|
while getopts bxi:a:m:qs:SM:N:d:t: ch; do
|
||||||
case ${ch} in
|
case ${ch} in
|
||||||
b)
|
b)
|
||||||
lists="${nlists} ${xlists}"
|
lists="${nlists} ${xlists}"
|
||||||
@ -68,6 +75,9 @@ while getopts bxi:a:m:s:SM:N:d:t: ch; do
|
|||||||
m)
|
m)
|
||||||
MACHINE="${OPTARG}"
|
MACHINE="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
|
q)
|
||||||
|
quiet=true
|
||||||
|
;;
|
||||||
s)
|
s)
|
||||||
setsdir="${OPTARG}"
|
setsdir="${OPTARG}"
|
||||||
;;
|
;;
|
||||||
@ -132,7 +142,7 @@ for setname in ${lists}; do
|
|||||||
${HOST_SH} "${setsdir}/makeflist" -a "${MACHINE_ARCH}" -m "${MACHINE}" \
|
${HOST_SH} "${setsdir}/makeflist" -a "${MACHINE_ARCH}" -m "${MACHINE}" \
|
||||||
-s "${setsdir}" "${setname}" > "${SDIR}/flist.${setname}"
|
-s "${setsdir}" "${setname}" > "${SDIR}/flist.${setname}"
|
||||||
if [ -n "${metalog}" ]; then
|
if [ -n "${metalog}" ]; then
|
||||||
${setfilesonly} && echo "Creating ${setlistdir}/set.${setname}"
|
${setfilesonly} && msg "Creating ${setlistdir}/set.${setname}"
|
||||||
${AWK} -f "${rundir}/getdirs.awk" "${SDIR}/flist.${setname}" \
|
${AWK} -f "${rundir}/getdirs.awk" "${SDIR}/flist.${setname}" \
|
||||||
| ${SORT} -u > "${SDIR}/flist.${setname}.full"
|
| ${SORT} -u > "${SDIR}/flist.${setname}.full"
|
||||||
(
|
(
|
||||||
@ -163,17 +173,17 @@ es=0
|
|||||||
for setname in ${lists}; do
|
for setname in ${lists}; do
|
||||||
out="${setname}.tgz"
|
out="${setname}.tgz"
|
||||||
if [ -n "${installdir}" ]; then
|
if [ -n "${installdir}" ]; then
|
||||||
echo "Copying set ${setname}"
|
msg "Copying set ${setname}"
|
||||||
( cd "${dest}"; \
|
( cd "${dest}"; \
|
||||||
${PAX} -O -rwpe -d -N"${etcdir}" ${metalog:+-M} \
|
${PAX} -O -rwpe -d -N"${etcdir}" ${metalog:+-M} \
|
||||||
"${installdir}" < "${setlistdir}/set.${setname}" )
|
"${installdir}" < "${setlistdir}/set.${setname}" )
|
||||||
else
|
else
|
||||||
if [ -n "${metalog}" -a "${tars}/${out}" -nt "${metalog}" ]
|
if [ -n "${metalog}" -a "${tars}/${out}" -nt "${metalog}" ]
|
||||||
then
|
then
|
||||||
echo "${out} is up to date"
|
msg "${out} is up to date"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "Creating ${out}"
|
msg "Creating ${out}"
|
||||||
rm -f "${tars}/${out}"
|
rm -f "${tars}/${out}"
|
||||||
TMPFILES="${TMPFILES} ${tars}/${out}.tmp"
|
TMPFILES="${TMPFILES} ${tars}/${out}.tmp"
|
||||||
( cd "${dest}"; \
|
( cd "${dest}"; \
|
||||||
|
Loading…
Reference in New Issue
Block a user