llvm-mirror/utils/makellvm
Vikram S. Adve 9b33ad41dc Use much better method to find the llvmbase directory.
Also, add -h option to print usage information.

llvm-svn: 3729
2002-09-15 16:58:30 +00:00

26 lines
633 B
Tcsh
Executable File

#!/bin/csh -f
## LLVMDIR is simply the directory where this script resides!
set THISEXEC = $0 ## cannot use :h on $0 for some reason
set LLVMDIR = $THISEXEC:h
set EXEC = opt
if ($#argv > 0) then
if (&& $argv[1] == "-h") then
echo 'USAGE: makellvm [toolname] (toolname defaults to "opt").'
exit 0
endif
set EXEC = NO_SUCH_TOOL
set TOOLS = `grep DIRS ${LLVMDIR}/tools/Makefile | sed 's/DIRS[ ]*=[ ]*//'`
foreach T ( $TOOLS )
if ($argv[1] == "$T") then
set EXEC = $T
shift argv
break
endif
end
endif
gnumake && (cd $LLVMDIR/tools/$EXEC && gnumake)