From: Michael Wallner Date: Wed, 15 Jan 2014 10:47:50 +0000 (+0100) Subject: path adjustments X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dbcbb3c734fe1ba928dc9c4819d4997eab1a8300;p=m6w6%2Fbtr path adjustments --- diff --git a/curl.example.conf b/curl.example.conf index 3f7c677..0bec462 100644 --- a/curl.example.conf +++ b/curl.example.conf @@ -1,3 +1,7 @@ +# Clone CURL's git (use master), build with GNU autotools ruleset which runs +# 'make check' and mail the report to the current user. Verbosely show all +# actions taken: + BTR_VERBOSE=true BTR_SOURCE_RULES=git BTR_SOURCE_ARGS=https://github.com/bagder/curl.git diff --git a/php.example.conf b/php.example.conf index c52ad8b..9408dd1 100644 --- a/php.example.conf +++ b/php.example.conf @@ -1,3 +1,7 @@ +# Clone PHP's git, use PHP-5.5 branch, build with php ruleset and run the test +# suite with valgrind (-m) on a debug build and report the results with a simple +# OSD notification: + BTR_SOURCE_RULES=git BTR_SOURCE_ARGS=git@php.net:php/php-src.git BTR_BRANCH=PHP-5.5 diff --git a/share/btr/btr.sh b/share/btr/btr.sh index 91bd801..03cbdf3 100755 --- a/share/btr/btr.sh +++ b/share/btr/btr.sh @@ -37,21 +37,6 @@ function btr-help { "$(find "$BTR_LIBDIR/$ruleset" -name '*.mk' -exec basename {} .mk \; | sort | xargs)" done echo - echo " Examples:" - echo - echo " Clone PHP's git, use PHP-5.5 branch, build with php ruleset and" - echo " run the test suite with valgrind (-m) on a debug build and report" - echo " the results with a simple OSD notification:" - echo " $ btr -s git=git@php.net:php/php-src.git -B PHP-5.5 \\" - echo " -b \"php=--enable-debug\" -T-m -r notify-send" - echo " See also php.example.conf" - echo - echo " Clone CURL's git (use master), build with GNU autotools" - echo " ruleset which runs 'make check' and mail the report to the" - echo " current user. Verbosely show all actions taken:" - echo " $ btr -v -s git=https://github.com/bagder/curl.git -b gnu -r mail" - echo " See also curl.example.conf" - echo exit } export -f btr-help diff --git a/share/btr/build/gnu.mk b/share/btr/build/gnu.mk index 0047ab7..1246cb1 100644 --- a/share/btr/build/gnu.mk +++ b/share/btr/build/gnu.mk @@ -18,28 +18,33 @@ clean: $(BTR_CONFIG_REPORT) fi; $(BTR_REPORT): $(BTR_TEST_REPORT) - if test -z "$(BTR_LAST_REPORT)"; then \ - echo 0; \ - elif test -s "$(BTR_LAST_REPORT)" -o -s "$(BTR_TEST_REPORT)"; then \ - cmp $(BTR_LAST_REPORT) $(BTR_TEST_REPORT) 2>&1 || true; \ - else \ - echo 0; \ - fi; + ( \ + if test -z "$(BTR_LAST_REPORT)"; then \ + echo 0; \ + elif test -s "$(BTR_LAST_REPORT)" -o -s "$(BTR_TEST_REPORT)"; then \ + cmp $(BTR_LAST_REPORT) $(BTR_TEST_REPORT) || true; \ + else \ + echo 0; \ + fi; + ) >$@ 2>&1 $(BTR_TEST_REPORT): $(BTR_BUILD_REPORT) $(SAY) "Running checks..." - cd $(BTR_BUILD_DIR) && \ - make check $(BTR_TEST_ARGS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + make check $(BTR_TEST_ARGS) \ + ) >$@ 2>&1 $(BTR_BUILD_REPORT): $(BTR_CONFIG_REPORT) $(SAY) "Making build..." - cd $(BTR_BUILD_DIR) && \ - make -j $(CPUS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + make -j $(CPUS) \ + ) >$@ 2>&1 $(BTR_CONFIG_REPORT): $(BTR_BRANCH_DIR)/configure | $(BTR_BUILD_DIR) $(BTR_LOG_DIR) $(SAY) "Running configure..." - cd $(BTR_BUILD_DIR) && \ - ../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + ../../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) \ + ) >$@ 2>&1 $(BTR_BUILD_DIR): mkdir -p $@ diff --git a/share/btr/build/pecl.mk b/share/btr/build/pecl.mk index 3ce75cc..a073bc5 100644 --- a/share/btr/build/pecl.mk +++ b/share/btr/build/pecl.mk @@ -35,17 +35,19 @@ $(BTR_REPORT): $(BTR_TEST_REPORT) $(BTR_TEST_REPORT): $(BTR_BUILD_REPORT) $(SAY) "Running tests... " cd $(BTR_BUILD_DIR) && \ - make test TESTS="$(BTR_TEST_ARGS) -s ../$@" >/dev/null + make test TESTS="$(BTR_TEST_ARGS) -s ../../$@" >/dev/null $(BTR_BUILD_REPORT): $(BTR_CONFIG_REPORT) $(SAY) "Making build..." - cd $(BTR_BUILD_DIR) && \ - make -j $(CPUS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + make -j $(CPUS) \ + ) >$@ 2>&1 $(BTR_CONFIG_REPORT): $(BTR_BRANCH_DIR)/configure | $(BTR_BUILD_DIR) $(BTR_LOG_DIR) $(SAY) "Running 'configure'..." - cd $(BTR_BUILD_DIR) && \ - ../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + ../../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) \ + ) >$@ 2>&1 $(BTR_BUILD_DIR): mkdir -p $@ diff --git a/share/btr/build/php.mk b/share/btr/build/php.mk index b858e2a..730418b 100644 --- a/share/btr/build/php.mk +++ b/share/btr/build/php.mk @@ -35,17 +35,19 @@ $(BTR_REPORT): $(BTR_TEST_REPORT) $(BTR_TEST_REPORT): $(BTR_BUILD_REPORT) $(SAY) "Running tests... " cd $(BTR_BUILD_DIR) && \ - make test TESTS="$(BTR_TEST_ARGS) -s ../$@" + make test TESTS="$(BTR_TEST_ARGS) -s ../../$@" $(BTR_BUILD_REPORT): $(BTR_CONFIG_REPORT) $(SAY) "Making build..." - cd $(BTR_BUILD_DIR) && \ - make -j $(CPUS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + make -j $(CPUS) \ + ) >$@ 2>&1 $(BTR_CONFIG_REPORT): $(BTR_BRANCH_DIR)/configure | $(BTR_BUILD_DIR) $(BTR_LOG_DIR) $(SAY) "Running 'configure'..." - cd $(BTR_BUILD_DIR) && \ - ../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) >../$@ 2>&1 + (cd $(BTR_BUILD_DIR) && \ + ../../$(BTR_BRANCH_DIR)/configure -C $(BTR_BUILD_ARGS) \ + ) >$@ 2>&1 $(BTR_BUILD_DIR): mkdir -p $@