1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Add a -A argument to mergemaster to allow explicitly specifying an

architecture to pass through to the underlying makefiles.  This is
quite useful when building on an i386 box to populate an amd64 NFS
root.

Head nod:	dougb
MFC after:	1 week
This commit is contained in:
Robert Watson 2006-02-04 18:24:06 +00:00
parent 0cc56a19e1
commit 344c91d1b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155309
2 changed files with 17 additions and 8 deletions

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 5, 2001
.Dd February 4, 2006
.Dt MERGEMASTER 8
.Os
.Sh NAME
@ -38,6 +38,7 @@
.Op Fl d
.Op Fl u Ar N
.Op Fl w Ar N
.Op Fl A Ar architecture
.Op Fl D Ar /path
.Sh DESCRIPTION
The
@ -235,6 +236,10 @@ Supply an alternate screen width to the
.Xr sdiff 1
command in numbers of columns.
The default is 80.
.It Fl A Ar architecture
Specify an alternative
.Ev TARGET_ARCH
architecture name.
.It Fl D Ar /path
Specify the destination directory for the installed files.
.El

View File

@ -33,6 +33,7 @@ display_usage () {
echo " -d Add date and time to directory name (e.g., /var/tmp/temproot.`date +%m%d.%H.%M`)"
echo " -u N Specify a numeric umask"
echo " -w N Specify a screen width in columns to sdiff"
echo " -A architecture Alternative architecture name to pass to make"
echo ' -D /path/directory Specify the destination directory to install files to'
echo ''
}
@ -238,8 +239,11 @@ fi
# Check the command line options
#
while getopts ":ascrvhipCPm:t:du:w:D:" COMMAND_LINE_ARGUMENT ; do
while getopts ":ascrvhipCPm:t:du:w:D:A:" COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
A)
ARCHSTRING='MACHINE_ARCH='${OPTARG}
;;
s)
STRICT=yes
unset DIFF_OPTIONS
@ -503,14 +507,14 @@ case "${RERUN}" in
case "${DESTDIR}" in
'') ;;
*)
make DESTDIR=${DESTDIR} distrib-dirs
make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs
;;
esac
make DESTDIR=${TEMPROOT} distrib-dirs &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make obj &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make all &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make DESTDIR=${TEMPROOT} \
distribution;} ||
make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all &&
MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \
DESTDIR=${TEMPROOT} distribution;} ||
{ echo '';
echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to";
echo " the temproot environment";