Permalink
Browse files

Save and use build options

  • Loading branch information...
1 parent 49826af commit 1ea63626ad6ffa9427e5bc2e304f3bd87a9ed56e @silas committed Dec 29, 2010
Showing with 16 additions and 7 deletions.
  1. +2 −1 .gitignore
  2. +14 −6 Makefile
View
@@ -2,8 +2,8 @@
*.dylib
*.log
*.o
-*.out
*.os
+*.out
*.pyc
*.so
*.so.*
@@ -13,6 +13,7 @@
.gdb_history
.sconf*
_trial_temp*
+config.*
test-*
tyrion
tyrion-node
View
@@ -1,19 +1,27 @@
+BUILD?=config.build
+INSTALL?=config.install
SCONS?=scons
TESTS?=./tests
OPTFLAGS?=
PREFIX?=/usr/local
-build:
- $(SCONS) --flags="${OPTFLAGS}"
+$(BUILD):
+ echo -n "$(SCONS) --flags=\"$(OPTFLAGS)\" --prefix=\"$(PREFIX)\"" > $(BUILD)
+ sh $(BUILD)
+
+build: $(BUILD)
devel:
- $(SCONS) --flags="${OPTFLAGS}" --with-devel
+ $(SCONS) --flags="$(OPTFLAGS)" --with-devel
-install:
- $(SCONS) --flags="${OPTFLAGS}" --prefix="${PREFIX}"
+install: $(BUILD)
+ cp -f $(BUILD) $(INSTALL)
+ echo -n " --install" >> $(INSTALL)
+ sh $(INSTALL)
test:
- cd ${TEST_DIR} && ./run
+ cd $(TESTS) && ./run
clean:
$(SCONS) -c
+ rm -f config.*

0 comments on commit 1ea6362

Please sign in to comment.