X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/143464d58d2bd6378e74eec636961ceb0d32fb91..fe8ab488e9161c46dd9885d58fc52996dc0249ff:/SETUP/config/doconf diff --git a/SETUP/config/doconf b/SETUP/config/doconf index 33612c023..8e2a5a1ed 100755 --- a/SETUP/config/doconf +++ b/SETUP/config/doconf @@ -69,9 +69,10 @@ set prog=$0 set prog=$prog:t set nonomatch set OBJDIR=../BUILD +set SOURCEDIR=. set CONFIG_DIR=$OBJROOT/SETUP/config +set MASTER_CONF_DIR=. -unset domake unset doconfig unset beverbose unset MACHINE @@ -85,10 +86,6 @@ while ($#argv >= 1) case "-config": set doconfig breaksw - case "-m": - case "-make": - set domake - breaksw case "-cpu": if ($#argv < 2) then echo "${prog}: missing argument to ${argv[1]}" @@ -113,6 +110,22 @@ while ($#argv >= 1) set OBJDIR="$argv[2]" shift breaksw + case "-m": + if ($#argv < 2) then + echo "${prog}: missing argument to ${argv[1]}" + exit 1 + endif + set MASTER_CONF_DIR="$argv[2]" + shift + breaksw + case "-s": + if ($#argv < 2) then + echo "${prog}: missing argument to ${argv[1]}" + exit 1 + endif + set SOURCEDIR="$argv[2]" + shift + breaksw case "-verbose": set beverbose breaksw @@ -134,62 +147,18 @@ end if ($#argv == 0) set argv=(GENERIC) if (! $?MACHINE) then - if (-d /NextApps) then - set MACHINE=`hostinfo | awk '/MC680x0/ { printf("m68k") } /MC880x0/ { printf("m88k") }'` - endif -endif - -if (! $?MACHINE) then - if (-f /etc/machine) then - set MACHINE="`/etc/machine`" - else - echo "${prog}: no /etc/machine, specify machine type with -cpu" - echo "${prog}: e.g. ${prog} -cpu VAX CONFIGURATION" - exit 1 - endif + echo "${prog}: MACHINE not set" + exit 1 endif -set FEATURES_EXTRA= - -switch ("$MACHINE") - case IBMRT: - set cpu=ca - set ID=RT - set FEATURES_EXTRA="romp_dualcall.h romp_fpa.h" - breaksw - case SUN: - set cpu=sun3 - set ID=SUN3 - breaksw - default: - set cpu=`echo $MACHINE | tr A-Z a-z` - set ID=`echo $MACHINE | tr a-z A-Z` - breaksw -endsw -set FEATURES=../h/features.h -set FEATURES_H=(cs_*.h mach_*.h net_*.h\ - cputypes.h cpus.h vice.h\ - $FEATURES_EXTRA) -set MASTER_DIR=../conf +set cpu=`echo $MACHINE | tr A-Z a-z` +set ID=`echo $MACHINE | tr a-z A-Z` +set MASTER_DIR=${MASTER_CONF_DIR} set MASTER = ${MASTER_DIR}/MASTER set MASTER_CPU=${MASTER}.${cpu} set MASTER_CPU_PER_SOC=${MASTER}.${cpu}.${SOC_CONFIG} if (-f $MASTER_CPU_PER_SOC) set MASTER_CPU = ${MASTER_CPU_PER_SOC} -set MASTER_LOCAL = ${MASTER}.local -set MASTER_CPU_LOCAL = ${MASTER_CPU}.local -set MASTER_CPU_PER_SOC_LOCAL = ${MASTER_CPU_PER_SOC}.local -if (! -f $MASTER_LOCAL) set MASTER_LOCAL = "" -if (! -f $MASTER_CPU_LOCAL) set MASTER_CPU_LOCAL = "" -if (-f $MASTER_CPU_PER_SOC_LOCAL) set MASTER_CPU_LOCAL = ${MASTER_CPU_PER_SOC_LOCAL} - -if (! -d $OBJDIR) then - if ($?beverbose) then - echo "[ creating $OBJDIR ]" - endif - mkdir -p $OBJDIR -endif - foreach SYS ($argv) set SYSID=${SYS}_${ID} set SYSCONF=$OBJDIR/config.$SYSID @@ -199,8 +168,8 @@ foreach SYS ($argv) endif echo +$SYS \ | \ - cat $MASTER $MASTER_LOCAL $MASTER_CPU $MASTER_CPU_LOCAL - \ - $MASTER $MASTER_LOCAL $MASTER_CPU $MASTER_CPU_LOCAL \ + cat $MASTER $MASTER_CPU - \ + $MASTER $MASTER_CPU \ | \ sed -n \ -e "/^+/{" \ @@ -274,12 +243,6 @@ part != 0 {\ echo "${prog}: ${$SYSID}: no such configuration in $MASTER_DIR/MASTER{,.$cpu}" rm -f $SYSCONF.new endif - if (! -d $BLDDIR) then - if ($?beverbose) then - echo "[ creating $BLDDIR ]" - endif - mkdir -p $BLDDIR - endif # # These paths are used by config. # @@ -315,15 +278,9 @@ part != 0 {\ echo "[ configuring $SYSID ]" endif if ($?profile) then - $CONFIG_DIR/config -c $MASTER_DIR -p $SYSCONF + $CONFIG_DIR/config -c $SOURCEDIR -p $SYSCONF else - $CONFIG_DIR/config -c $MASTER_DIR $SYSCONF + $CONFIG_DIR/config -c $SOURCEDIR $SYSCONF endif endif - if ($?domake) then - if ($?beverbose) then - echo "[ making $SYSID ]" - endif - (cd $BLDDIR; make) - endif end