blob: 8924012203b22f6cd02510d110ce4cad872401dd [file] [log] [blame]
Vikram S. Adve631484c2002-09-15 16:33:32 +00001#!/bin/csh -f
2
Vikram S. Adve0731d542002-09-15 16:58:30 +00003 ## LLVMDIR is simply the directory where this script resides!
4set THISEXEC = $0 ## cannot use :h on $0 for some reason
5set LLVMDIR = $THISEXEC:h
Vikram S. Adve631484c2002-09-15 16:33:32 +00006set EXEC = opt
7
8if ($#argv > 0) then
Vikram S. Adve0731d542002-09-15 16:58:30 +00009 if (&& $argv[1] == "-h") then
10 echo 'USAGE: makellvm [toolname] (toolname defaults to "opt").'
11 exit 0
12 endif
13
Vikram S. Adve631484c2002-09-15 16:33:32 +000014 set EXEC = NO_SUCH_TOOL
15 set TOOLS = `grep DIRS ${LLVMDIR}/tools/Makefile | sed 's/DIRS[ ]*=[ ]*//'`
16 foreach T ( $TOOLS )
17 if ($argv[1] == "$T") then
18 set EXEC = $T
19 shift argv
20 break
21 endif
22 end
23endif
24
25gnumake && (cd $LLVMDIR/tools/$EXEC && gnumake)