From f6432075fc064742e1e73ed4b29dcaeaaf7f2279 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 1 Jul 2013 09:50:09 +0200 Subject: [PATCH] gnu build --- lib/btr/build/gnu.mk | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/btr/build/gnu.mk diff --git a/lib/btr/build/gnu.mk b/lib/btr/build/gnu.mk new file mode 100644 index 0000000..bd37c2c --- /dev/null +++ b/lib/btr/build/gnu.mk @@ -0,0 +1,34 @@ +.PHONY: all +.SUFFIXES: + +CONFIGS=$(wildcard $(BRANCH_DIR)/configure.*) + +all: $(TEST_REPORT) + if test -z "$(LAST_REPORT)"; then \ + echo 0; \ + elif test -s "$(LAST_REPORT)" -o -s "$(TEST_REPORT)"; then \ + cmp $(LAST_REPORT) $(TEST_REPORT); 2>&1 || true \ + else \ + echo 0; \ + fi; + +$(TEST_REPORT): $(BUILD_REPORT) + cd $(BUILD_DIR) && \ + make check $(CHECKS) > ../$@ + +$(BUILD_REPORT): $(CONFIG_REPORT) + cd $(BUILD_DIR) && \ + make -j $(CPUS) > ../$@ + +$(CONFIG_REPORT): $(BRANCH_DIR)/configure $(BUILD_DIR) + cd $(BUILD_DIR) && \ + ../$(BRANCH_DIR)/configure -C $(CONFIGURE) > ../$@ + +$(BUILD_DIR): + mkdir -p $@ + +$(BRANCH_DIR)/configure: $(CONFIGS) + cd $(BRANCH_DIR) && \ + autoreconf -i -f -W none >/dev/null + +# vim: noet -- 2.30.2