.PHONY: .check-git-HEAD
.check-git-HEAD:
sha="`git rev-parse HEAD`"; \
- [ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
+ test -f '$@' && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|| echo "$$sha" > '$@'
$(MAKE) po-check
po-update:
- [ -d "po" ] && $(MAKE) do-po-update
+ test -d "po" && $(MAKE) do-po-update
# -------------------------- #
# Updating GNU build files. #
# Get the GNU make web page boilerplate etc.
update-makeweb:
- [ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)'
- [ -d '$(MAKEWEBDIR)'/CVS ] \
+ test -d '$(MAKEWEBDIR)' || mkdir -p '$(MAKEWEBDIR)'
+ test -d '$(MAKEWEBDIR)'/CVS \
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
# Get the GNU web page boilerplate etc.
update-gnuweb:
- [ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)'
- [ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \
+ test -d '$(GNUWEBDIR)' || mkdir -p '$(GNUWEBDIR)'
+ test -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS \
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
cov-submit: $(COV_BUILD_FILE)-submitted
$(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
- @[ -n "$(COVERITY_TOKEN)" ] || { echo 'COVERITY_TOKEN not set'; exit 1; }
- @[ -n "$(COVERITY_EMAIL)" ] || { echo 'COVERITY_EMAIL not set'; exit 1; }
+ @test -n "$(COVERITY_TOKEN)" || { echo 'COVERITY_TOKEN not set'; exit 1; }
+ @test -n "$(COVERITY_EMAIL)" || { echo 'COVERITY_EMAIL not set'; exit 1; }
rm -f '$@'
case '$(VERSION)' in \
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
run () {
cmd=$(command -v "$update") || die "Cannot locate update-copyright ($update)"
- [ -x "$cmd" ] || die "Cannot locate update-copyright ($update)"
+ test -x "$cmd" || die "Cannot locate update-copyright ($update)"
force=false
if $force; then
: just do it
- elif [ ! -f src/makeint.h ]; then
+ elif test ! -f src/makeint.h; then
die "Run in the root of the GNU make workspace"
- elif [ -f configure ]; then
+ elif test -f configure; then
die "Run in a clean workspace (git clean -fdX)"
fi
a : b ; echo >> $@
-b : c ; [ -f $@ ] || echo >> $@
+b : c ; test -f $@ || echo >> $@
c: ; echo >> $@
include $(F)',
- 'F=a', "[ -f b ] || echo >> b\nhello\n");
+ 'F=a', "test -f b || echo >> b\nhello\n");
# Now try with the file we're not updating being the actual file we're
# including: this and the previous one test different parts of the code.
-run_make_test(undef, 'F=b', "[ -f b ] || echo >> b\nhello\n");
+run_make_test(undef, 'F=b', "test -f b || echo >> b\nhello\n");
&rmfiles('a','b','c');
# (> make default buffer length)
run_make_test('
-base_metals_fmd_reports.sun5 base_metals_fmd_reports CreateRealPositions CreateMarginFunds deals_changed_since : BUILD_OBJ=$(shell if [ -f "build_information.generate" ]; then echo "$(OBJ_DIR)/build_information.o"; else echo "no build information"; fi )
+base_metals_fmd_reports.sun5 base_metals_fmd_reports CreateRealPositions CreateMarginFunds deals_changed_since : BUILD_OBJ=$(shell if test -f "build_information.generate" ; then echo "$(OBJ_DIR)/build_information.o"; else echo "no build information"; fi )
deals_changed_since: ; @echo $(BUILD_OBJ)
',