Source to conf/tools/doconf/doconf.csh


Enter a symbol's name here to quickly find it.

#!/bin/csh -f
set path = ($path .)

##
# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
#
# @[email protected]
# 
# "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
# Reserved.  This file contains Original Code and/or Modifications of
# Original Code as defined in and that are subject to the Apple Public
# Source License Version 1.0 (the 'License').  You may not use this file
# except in compliance with the License.  Please obtain a copy of the
# License at http://www.apple.com/publicsource and read it before using
# this file.
# 
# The Original Code and all software distributed under the License are
# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
# License for the specific language governing rights and limitations
# under the License."
# 
# @[email protected]
##

set prog=$0
set prog=$prog:t
set nonomatch
set OBJDIR=../BUILD
set CONFIG_DIR=/usr/local/bin

unset domake
unset doconfig
unset beverbose
unset MACHINE
unset profile

while ($#argv >= 1)
    if ("$argv[1]" =~ -*) then
        switch ("$argv[1]")
	case "-c":
	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]}"
		exit 1
	    endif
	    set MACHINE="$argv[2]"
	    shift
	    breaksw
	case "-d":
	    if ($#argv < 2) then
		echo "${prog}: missing argument to ${argv[1]}"
		exit 1
	    endif
	    set OBJDIR="$argv[2]"
	    shift
	    breaksw
	case "-verbose":
	    set beverbose
	    breaksw
	case "-p":
	case "-profile":
	    set profile
	    breaksw
	default:
	    echo "${prog}: ${argv[1]}: unknown switch"
	    exit 1
	    breaksw
	endsw
	shift
    else
	break
    endif
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