X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=inline;f=share%2Fbtr%2Fbuild%2Fpecl.mk;fp=share%2Fbtr%2Fbuild%2Fpecl.mk;h=3ce75ccf1bbd8dc823975a64384b5f1635b921c7;hb=36ab11ad208509a177f3976333d0728069e06ee8;hp=c27b23a2c18e477f6d9f5d93a2953e632f4768eb;hpb=3ea412c37b536f7f5f6b179c583f755ab70f1934;p=m6w6%2Fbtr diff --git a/share/btr/build/pecl.mk b/share/btr/build/pecl.mk index c27b23a..3ce75cc 100644 --- a/share/btr/build/pecl.mk +++ b/share/btr/build/pecl.mk @@ -1,30 +1,30 @@ -BUILD_CLEAN=false -BUILD_ARGS= -TEST_ARGS= -q +BTR_BUILD_CLEAN=false +BTR_BUILD_ARGS= +BTR_TEST_ARGS= -q .PHONY: all clean .SUFFIXES: -CONFIGS=$(wildcard $(BRANCH_DIR)/config*.m4 $(BRANCH_DIR)/*/config*.m4) +CONFIGS=$(wildcard $(BTR_BRANCH_DIR)/config*.m4 $(BTR_BRANCH_DIR)/*/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 ../$@" >/dev/null + cd $(BTR_BUILD_DIR) && \ + make test TESTS="$(BTR_TEST_ARGS) -s ../$@" >/dev/null -$(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 $@ - -$(BRANCH_DIR)/configure: $(CONFIGS) + +$(BTR_LOG_DIR): + mkdir -p $@ + +$(BTR_BRANCH_DIR)/configure: $(CONFIGS) $(SAY) "Running phpize..." - cd $(BRANCH_DIR) && \ + cd $(BTR_BRANCH_DIR) && \ phpize >/dev/null # vim: noet