diff options
author | dim <dim@FreeBSD.org> | 2010-10-11 17:22:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-10-11 17:22:16 +0000 |
commit | 1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6 (patch) | |
tree | de75a464c5dac7eceb2dbbad8b4d4e1479d79e08 /contrib/llvm/utils/makellvm | |
parent | f4f7191cd223adebacee3fad260ed60935be9cb9 (diff) | |
download | FreeBSD-src-1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6.zip FreeBSD-src-1fc65a65fe54635d0e564559ba5a7b8a8a42d4d6.tar.gz |
Remove more unneeded files and directories from contrib/llvm. This
still allows us to build tblgen and clang, and further reduces the
footprint in the tree.
Approved by: rpaulo (mentor)
Diffstat (limited to 'contrib/llvm/utils/makellvm')
-rwxr-xr-x | contrib/llvm/utils/makellvm | 145 |
1 files changed, 0 insertions, 145 deletions
diff --git a/contrib/llvm/utils/makellvm b/contrib/llvm/utils/makellvm deleted file mode 100755 index ae77712..0000000 --- a/contrib/llvm/utils/makellvm +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/csh -f - -set pstatus = 0 -onintr cleanup -alias usage 'echo "USAGE: $0:t [-h] [-n] [-obj obj-root] [gmake-flags] [VAR=...] [toolname (default: opt)]"; set pstatus = 1; goto cleanup' - -set EXEC = opt -set GMAKE_OPTS = "" -set DEBUG = 0 - -## Search path for automatically finding the obj-root to use. -## Note: The src root directory ${LLVMDIR} will be prepended to this path later. -## -set OBJROOTDIRLIST = ( ) - -set doit = 1 -unset options_done -while ( !( $?options_done ) && ($#argv > 0)) - switch ($argv[1]) - case -h : - usage - case -f : - if ($#argv < 2) usage - shift argv; set MFILE = $argv[1]; shift argv; breaksw - case -n : - set doit = 0; shift argv; breaksw - case -obj : - set OBJROOT = $argv[2]; shift argv; shift argv - if (! -d "$OBJROOT") then - echo "FATAL: Illegal obj-root directory ${OBJROOT}" - exit 1 - endif - breaksw - case -d : - set doit = 0; set DEBUG = 1; shift argv; breaksw - case -* : - set GMAKE_OPTS = ( $GMAKE_OPTS $argv[1] ); shift argv; breaksw - default : - set optarg = `echo -n $argv[1] | sed 's/^[^=]*$//'` - if ($#optarg) then - set GMAKE_OPTS = ( $GMAKE_OPTS $optarg ) - shift argv - else - set options_done - endif - breaksw - endsw -end - -if ($#argv > 1) then - echo 'ERROR: More than one tool is not supported by "makellvm"' - usage -endif -if ($#argv > 0) then - set EXEC = $argv[1] -endif -if ($DEBUG) then - echo "DEBUG: EXEC = $EXEC" -endif - -## Compute LLVMDIR: the root of the current LLVM tree. -## It is recorded in the variable LEVEL in Makefile, to compute it -## -if (! $?MFILE) then - if (-f GNUmakefile) then - set MFILE = GNUmakefile - else if (-f makefile) then - set MFILE = makefile - else - set MFILE = Makefile - endif -endif -if ($DEBUG) then - echo "DEBUG: MFILE = $MFILE" -endif -if (! -f $MFILE) then - echo "Missing or invalid makefile: $MFILE" - exit 1 -endif - -set LLVMDIR = `awk '/LEVEL[ ]*=/ {print $NF}' $MFILE` -if ($DEBUG) then - echo "DEBUG: LLVMDIR = $LLVMDIR" -endif - -if ($#LLVMDIR == 0 || ! -d "$LLVMDIR") then - echo "Unable to find LLVM src-root directory or directory is invalid." - echo "Are you within a valid LLVM directory for running gmake?" - exit 1 -endif - -## Try to determine the obj-root directory automatically if not specified -## -set OBJROOTDIRLIST = ( ${LLVMDIR} $OBJROOTDIRLIST ) ## add src dir -if ($?OBJROOT == 0) then - ## Try to determine object root directory by looking for Makefile.config - foreach objdir ( $OBJROOTDIRLIST ) - if (-f "${objdir}/Makefile.config") then - set OBJROOT = ${objdir} - break - endif - end - if ($?OBJROOT == 0) then - echo "FATAL: Could not choose an obj-root directory from these choices:" - echo " ${OBJROOTDIRLIST}." - echo " You can specify it explicitly using '-obj obj-root'." - exit 1 - endif - echo "Using OBJ-ROOT = ${OBJROOT} (specify '-obj obj-root' to override)." -endif -if (${OBJROOT} == ${LLVMDIR}) then - # run make in the source directory itself - set BUILDROOT = . -else - # run make in the in the obj-root tree, in the directory for $cwd - set SRCROOT = `sh -c "cd $LLVMDIR; pwd | sed 's/\//\\\//g'"` - set CURSRCDIR = `echo $cwd | sed -e "s/${SRCROOT}//"` - set BUILDROOT = ${OBJROOT}/${CURSRCDIR} - unset SRCROOT CURSRCDIR -endif -if ($DEBUG) then - echo "DEBUG: BUILDROOT = $BUILDROOT" -endif -if (! -d $BUILDROOT) then - echo "FATAL: Invalid build directory: ${BUILDROOT}" - exit 1 -endif -cd $BUILDROOT - -set CMD = "make $GMAKE_OPTS && (cd $LLVMDIR/tools/$EXEC && make $GMAKE_OPTS)" - -if ($doit == 1) then - csh -f -c "$CMD" - set pstatus = $? -else - echo '(NOT EXECUTING) COMMAND:' - echo " $CMD" -endif - - -#========================================================= -# CODE TO BE EXECUTED IF INTERRUPT IS RECEIVED -#========================================================= -cleanup: - exit($pstatus) |