+# 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
+# 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
"$(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
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 $@
$(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 $@
$(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 $@