5 alias usage 'echo "USAGE: $0:t [-h] [-n] [gmake-flag...] [VAR=...] [toolname (default: opt)]"; set pstatus = 1; goto cleanup'
13 while ( !( $?options_done ) && ($#argv > 0))
19 shift argv; set MFILE = $argv[1]; shift argv; breaksw
21 set doit = 0; shift argv; breaksw
23 set doit = 0; set DEBUG = 1; shift argv; breaksw
25 set GMAKE_OPTS = ( $GMAKE_OPTS $argv[1] ); shift argv; breaksw
27 set optarg = `echo -n $argv[1] | sed 's/^[^=]*$//'`
29 set GMAKE_OPTS = ( $GMAKE_OPTS $optarg )
39 echo 'ERROR: More than one tool is not supported by "makellvm"'
46 echo "DEBUG: EXEC = $EXEC"
49 ## Compute LLVMDIR: the root of the current LLVM tree.
50 ## It is recorded in the variable LEVEL in Makefile, to compute it
53 if (-f GNUmakefile) then
54 set MFILE = GNUmakefile
55 else if (-f makefile) then
62 echo "DEBUG: MFILE = $MFILE"
65 echo "Missing or invalid makefile: $MFILE"
69 set LLVMDIR = `awk '/LEVEL[ ]*=/ {print $NF}' $MFILE`
71 echo "DEBUG: LLVMDIR = $LLVMDIR"
74 if ($#LLVMDIR == 0 || ! -d "$LLVMDIR") then
75 echo "Unable to find LLVM obj-root directory or directory is invalid."
76 echo "Are you within a valid LLVM directory for running gmake?"
80 set CMD = "gmake $GMAKE_OPTS && (cd $LLVMDIR/tools/$EXEC && gmake $GMAKE_OPTS)"
85 echo '(NOT EXECUTING) COMMAND:'
90 #=========================================================
91 # CODE TO BE EXECUTED IF INTERRUPT IS RECEIVED
92 #=========================================================