summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-13 02:53:17 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-13 02:53:17 -0700
commit4b96cad11e9b97b9a773b50d91ab75b610205af9 (patch)
treee9800200a6fa3322ceb392238d543850ddc6fc9e
parent5366d78995106b1017068e7d2ef043e27c1383fe (diff)
downloadmc-integrated.tar.gz
Build tweaksintegrated
./configure, when run automatically, now remembers your prefix and such. Also, mbld correctly reruns it.
-rwxr-xr-xconfigure9
-rw-r--r--mbld/bldfile4
-rw-r--r--mk/c.mk2
3 files changed, 12 insertions, 3 deletions
diff --git a/configure b/configure
index ed73eb1..0af6d2a 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,11 @@ prefix="/usr/local"
for arg in $*; do
shift 1
case $arg in
+ "--redo" | "-r")
+ if [ -f ./var_cache ]; then
+ . ./var_cache
+ fi
+ ;;
"--prefix" | "-p")
prefix=shift $*
;;
@@ -86,7 +91,7 @@ echo ";;" >> mbld/config.myr
case $MACH in
*x86_64*)
echo 'export ARCH=x64' >> config.mk
- echo 'const Arch = "FreeBSD"' >> mbld/config.myr
+ echo 'const Arch = "x64"' >> mbld/config.myr
;;
*)
echo ''
@@ -96,6 +101,8 @@ case $MACH in
echo '********************************'
esac
+echo prefix=$prefix > var_cache
+
cat << EOF
Building with:
prefix=$prefix
diff --git a/mbld/bldfile b/mbld/bldfile
index 4137876..1986947 100644
--- a/mbld/bldfile
+++ b/mbld/bldfile
@@ -24,7 +24,9 @@ bin mbld =
lib ../libregex:regex
;;
-gen config.myr {durable} = ../configure ;;
+gen config.myr {durable} =
+ sh -c "cd .. && ./configure --redo"
+;;
man = mbld.1;;
diff --git a/mk/c.mk b/mk/c.mk
index 0a7f212..45a249a 100644
--- a/mk/c.mk
+++ b/mk/c.mk
@@ -117,6 +117,6 @@ uninstall: subdirs-uninstall
mkdir -p $(_DEPSDIR)
config.mk: configure
- ./configure
+ ./configure --redo
-include $(_DEPS)