X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/fe8ab488e9161c46dd9885d58fc52996dc0249ff..HEAD:/SETUP/config/doconf diff --git a/SETUP/config/doconf b/SETUP/config/doconf index 8e2a5a1ed..7b0d5ace8 100755 --- a/SETUP/config/doconf +++ b/SETUP/config/doconf @@ -78,6 +78,7 @@ unset beverbose unset MACHINE unset profile unset SOC_CONFIG +unset PLATFORM while ($#argv >= 1) if ("$argv[1]" =~ -*) then @@ -102,6 +103,14 @@ while ($#argv >= 1) set SOC_CONFIG="$argv[2]" shift breaksw + case "-platform": + if ($#argv < 2) then + echo "${prog}: missing argument to ${argv[1]}" + exit 1 + endif + set PLATFORM="$argv[2]" + shift + breaksw case "-d": if ($#argv < 2) then echo "${prog}: missing argument to ${argv[1]}" @@ -155,22 +164,32 @@ 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} + +foreach master_file (${MASTER}.${cpu}.${SOC_CONFIG}.${PLATFORM} ${MASTER}.${cpu}.${SOC_CONFIG} ${MASTER}.${cpu}.${PLATFORM} ${MASTER}.${cpu}) + if (-f $master_file) then + set MASTER_CPU = $master_file + break + endif +end + +if ($?beverbose) then + echo MASTER_CPU=$MASTER_CPU +endif foreach SYS ($argv) set SYSID=${SYS}_${ID} set SYSCONF=$OBJDIR/config.$SYSID set BLDDIR=$OBJDIR if ($?beverbose) then - echo "[ generating $SYSID from $MASTER_DIR/MASTER{,.$cpu}{,.local} ]" + echo "[ generating $SYSID from $MASTER_DIR/MASTER{,.$cpu}{,.local} ]" endif echo +$SYS \ | \ cat $MASTER $MASTER_CPU - \ $MASTER $MASTER_CPU \ | \ + unifdef -t -DPLATFORM_${PLATFORM} -DCPU_$cpu -DSOC_CONFIG_${SOC_CONFIG} -DSYS_${SYS} - \ + | \ sed -n \ -e "/^+/{" \ -e "s;[-+];#&;gp" \