gnu build
authorMichael Wallner <mike@php.net>
Mon, 1 Jul 2013 07:50:09 +0000 (09:50 +0200)
committerMichael Wallner <mike@php.net>
Mon, 1 Jul 2013 07:50:09 +0000 (09:50 +0200)
lib/btr/build/gnu.mk [new file with mode: 0644]

diff --git a/lib/btr/build/gnu.mk b/lib/btr/build/gnu.mk
new file mode 100644 (file)
index 0000000..bd37c2c
--- /dev/null
@@ -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