From: Michael Wallner Date: Mon, 1 Jul 2013 07:50:09 +0000 (+0200) Subject: gnu build X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f6432075fc064742e1e73ed4b29dcaeaaf7f2279;p=m6w6%2Fbtr gnu build --- 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