From 288e2ce02f0c4dd696de155be0d4b8ee7f94f54d Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sun, 15 Sep 2002 16:33:32 +0000 Subject: [PATCH] Shell-script to build current directory and then link one tool (default: opt) llvm-svn: 3727 --- llvm/makellvm | 18 ++++++++++++++++++ llvm/utils/makellvm | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 llvm/makellvm create mode 100755 llvm/utils/makellvm diff --git a/llvm/makellvm b/llvm/makellvm new file mode 100755 index 000000000000..b61a99ad3629 --- /dev/null +++ b/llvm/makellvm @@ -0,0 +1,18 @@ +#!/bin/csh -f + +set LLVMDIR = $HOME/llvm +set EXEC = opt + +if ($#argv > 0) then + 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) diff --git a/llvm/utils/makellvm b/llvm/utils/makellvm new file mode 100755 index 000000000000..b61a99ad3629 --- /dev/null +++ b/llvm/utils/makellvm @@ -0,0 +1,18 @@ +#!/bin/csh -f + +set LLVMDIR = $HOME/llvm +set EXEC = opt + +if ($#argv > 0) then + 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)