X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fbtr;a=blobdiff_plain;f=share%2Fbtr%2Fbuild%2Fphp.mk;h=b858e2a6897243749ebf459ccf9f2f7669f1ad1d;hp=35a7c71cca26aa95164b6e205e1c7d84e2ad1288;hb=36ab11ad208509a177f3976333d0728069e06ee8;hpb=3ea412c37b536f7f5f6b179c583f755ab70f1934 diff --git a/share/btr/build/php.mk b/share/btr/build/php.mk index 35a7c71..b858e2a 100644 --- a/share/btr/build/php.mk +++ b/share/btr/build/php.mk @@ -1,30 +1,30 @@ -BUILD_CLEAN=false -BUILD_ARGS= --enable-debug -TEST_ARGS= -q +BTR_BUILD_CLEAN=false +BTR_BUILD_ARGS= --enable-debug +BTR_TEST_ARGS= -q .PHONY: all clean .SUFFIXES: -CONFIGS=$(wildcard $(BRANCH_DIR)/ext/*/config*.m4) +CONFIGS=$(wildcard $(BTR_BRANCH_DIR)/ext/*/config*.m4) -all: clean $(REPORT) - $(SAY) "Result: $$(cat $(REPORT))" +all: clean $(BTR_REPORT) + $(SAY) "Result: $$(cat $(BTR_REPORT))" -clean: $(CONFIG_REPORT) - if $(BUILD_CLEAN); \ +clean: $(BTR_CONFIG_REPORT) + if $(BTR_BUILD_CLEAN); \ then \ - cd $(BUILD_DIR) && \ - make $(SILENT_FLAG) clean; \ + cd $(BTR_BUILD_DIR) && \ + make $(BTR_SILENT_FLAG) clean; \ fi; -$(REPORT): $(TEST_REPORT) +$(BTR_REPORT): $(BTR_TEST_REPORT) @(\ - TESTS_PASSED=$$(awk '/^Tests passed/{print $$4}' < $(TEST_REPORT)); \ - TESTS_FAILED=$$(awk '/^Tests failed/{print $$4}' < $(TEST_REPORT)); \ + TESTS_PASSED=$$(awk '/^Tests passed/{print $$4}' < $(BTR_TEST_REPORT)); \ + TESTS_FAILED=$$(awk '/^Tests failed/{print $$4}' < $(BTR_TEST_REPORT)); \ printf "%d/%d" $$TESTS_PASSED $$TESTS_FAILED >$@; \ - if test -s "$(LAST_REPORT)"; then \ - LAST_PASSED=$$(awk '/^Tests passed/{print $$4}' < $(LAST_REPORT)); \ - LAST_FAILED=$$(awk '/^Tests failed/{print $$4}' < $(LAST_REPORT)); \ + if test -s "$(BTR_LAST_REPORT)"; then \ + LAST_PASSED=$$(awk '/^Tests passed/{print $$4}' < $(BTR_LAST_REPORT)); \ + LAST_FAILED=$$(awk '/^Tests failed/{print $$4}' < $(BTR_LAST_REPORT)); \ DIFF_PASSED=$$(bc <<<"$$TESTS_PASSED - $$LAST_PASSED"); \ DIFF_FAILED=$$(bc <<<"$$TESTS_FAILED - $$LAST_FAILED"); \ printf " %+d/%+d" $$DIFF_PASSED $$DIFF_FAILED >>$@; \ @@ -32,27 +32,30 @@ $(REPORT): $(TEST_REPORT) printf "\n" >>$@; \ ) -$(TEST_REPORT): $(BUILD_REPORT) +$(BTR_TEST_REPORT): $(BTR_BUILD_REPORT) $(SAY) "Running tests... " - cd $(BUILD_DIR) && \ - make test TESTS="$(TEST_ARGS) -s ../$@" + cd $(BTR_BUILD_DIR) && \ + make test TESTS="$(BTR_TEST_ARGS) -s ../$@" -$(BUILD_REPORT): $(CONFIG_REPORT) +$(BTR_BUILD_REPORT): $(BTR_CONFIG_REPORT) $(SAY) "Making build..." - cd $(BUILD_DIR) && \ + cd $(BTR_BUILD_DIR) && \ make -j $(CPUS) >../$@ 2>&1 -$(CONFIG_REPORT): $(BRANCH_DIR)/configure $(BUILD_DIR) +$(BTR_CONFIG_REPORT): $(BTR_BRANCH_DIR)/configure | $(BTR_BUILD_DIR) $(BTR_LOG_DIR) $(SAY) "Running 'configure'..." - cd $(BUILD_DIR) && \ - ../$(BRANCH_DIR)/configure -C $(BUILD_ARGS) >../$@ 2>&1 + cd $(BTR_BUILD_DIR) && \ + ../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) >../$@ 2>&1 -$(BUILD_DIR): +$(BTR_BUILD_DIR): + mkdir -p $@ + +$(BTR_LOG_DIR): mkdir -p $@ -$(BRANCH_DIR)/configure: $(BRANCH_DIR)/buildconf $(CONFIGS) +$(BTR_BRANCH_DIR)/configure: $(BTR_BRANCH_DIR)/buildconf $(CONFIGS) $(SAY) "Building configure..." - cd $(BRANCH_DIR) && \ + cd $(BTR_BRANCH_DIR) && \ ./buildconf >/dev/null # vim: noet