diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-02-04 18:24:06 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-02-04 18:24:06 +0000 |
commit | f7eaf7f2fdc7c06f9d09b4138b8d58e312649bef (patch) | |
tree | 0a9642590f0f587fd03439aece453ebb6653c09e /usr.sbin | |
parent | 9e3a00153228ade18dd16caad96810c85df7fd80 (diff) | |
download | FreeBSD-src-f7eaf7f2fdc7c06f9d09b4138b8d58e312649bef.zip FreeBSD-src-f7eaf7f2fdc7c06f9d09b4138b8d58e312649bef.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mergemaster/mergemaster.8 | 7 | ||||
-rwxr-xr-x | usr.sbin/mergemaster/mergemaster.sh | 18 |
2 files changed, 17 insertions, 8 deletions
diff --git a/usr.sbin/mergemaster/mergemaster.8 b/usr.sbin/mergemaster/mergemaster.8 index 646fbd9..898430c 100644 --- a/usr.sbin/mergemaster/mergemaster.8 +++ b/usr.sbin/mergemaster/mergemaster.8 @@ -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 diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index 9a67e43..cf2674e 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -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"; |