2002-09-15 16:33:32 +00:00
|
|
|
#!/bin/csh -f
|
|
|
|
|
2002-09-15 16:58:30 +00:00
|
|
|
## LLVMDIR is simply the directory where this script resides!
|
|
|
|
set THISEXEC = $0 ## cannot use :h on $0 for some reason
|
|
|
|
set LLVMDIR = $THISEXEC:h
|
2002-09-15 16:33:32 +00:00
|
|
|
set EXEC = opt
|
|
|
|
|
|
|
|
if ($#argv > 0) then
|
2002-09-15 16:58:30 +00:00
|
|
|
if (&& $argv[1] == "-h") then
|
|
|
|
echo 'USAGE: makellvm [toolname] (toolname defaults to "opt").'
|
|
|
|
exit 0
|
|
|
|
endif
|
|
|
|
|
2002-09-15 16:33:32 +00:00
|
|
|
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)
|