diff options
| author | Graydon Hoare <[email protected]> | 2011-03-16 09:17:32 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-16 09:22:25 -0700 |
| commit | 9c6e7e6891dd86f26f4b35671e6ba6c46f41dc75 (patch) | |
| tree | 770db89766cfac2e913084cebe859ca23c28a496 /src/configure.sh | |
| parent | Revert 6fdb81fa17b3c7147a69edc5217c9f93ff485410, it is causing failures in (diff) | |
| download | rust-9c6e7e6891dd86f26f4b35671e6ba6c46f41dc75.tar.xz rust-9c6e7e6891dd86f26f4b35671e6ba6c46f41dc75.zip | |
Beginning of build-system upgrade.
Diffstat (limited to 'src/configure.sh')
| -rw-r--r-- | src/configure.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/configure.sh b/src/configure.sh new file mode 100644 index 00000000..eb741680 --- /dev/null +++ b/src/configure.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +CFG_SRC_DIR=${0%${0##*/}} +CFG_BUILD_DIR=$PWD + +CFG_OSTYPE=$(uname -s) +CFG_CPUTYPE=$(uname -m) + +echo "configuring on $CFG_CPUTYPE $CFG_OSTYPE" + +echo "setting up build directories" +for i in boot/{fe,me,be,driver,util} \ + rt/{isaac,bigint,sync,test} \ + stage{0,1,2} \ + test/{run-pass,compile-{pass,fail}} +do + mkdir -p -v $i +done + +CFG_VALGRIND=$(sh which valgrind) +CFG_OCAMLC_OPT=$(sh which ocamlc.opt) + +echo "copying Makefile" +cp -v ${CFG_SRC_DIR}Makefile.in ./Makefile + +echo "writing config.mk" +cat >config.mk <<EOF + +CFG_OSTYPE := $CFG_OSTYPE +CFG_CPUTYPE := $CFG_CPUTYPE +CFG_SRC_DIR := $CFG_SRC_DIR +CFG_BUILD_DIR := $CFG_BUILD_DIR + +CFG_VALGRIND := $CFG_VALGRIND +CFG_OCAMLC_OPT := $CFG_OCAMLC_OPT + +EOF + +echo "configured ok" |