diff --git a/build.sh b/build.sh index 4c88b534..cc1c7909 100755 --- a/build.sh +++ b/build.sh @@ -103,7 +103,7 @@ convert () esac fn="$top_srcdir/lib/${fn##*/}" - [ -f "$fn" ] || { echo "Missing file: $fn"; exit 1; } + test -f "$fn" || { echo "Missing file: $fn"; exit 1; } sed "/definitions* of $inc/r $fn" "$int" > "${int}_" int=${int}_ diff --git a/maintMakefile b/maintMakefile index 119a901c..dc4616db 100644 --- a/maintMakefile +++ b/maintMakefile @@ -140,7 +140,7 @@ ChangeLog: .check-git-HEAD .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" > '$@' @@ -187,7 +187,7 @@ do-po-update: $(MAKE) po-check po-update: - [ -d "po" ] && $(MAKE) do-po-update + test -d "po" && $(MAKE) do-po-update # -------------------------- # # Updating GNU build files. # @@ -385,16 +385,16 @@ gnuweb-dir = www/server/standards # 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)'; } @@ -446,8 +446,8 @@ $(COV_BUILD_FILE): $(filter %.c %.h,$(DISTFILES)) 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)" ;; \ diff --git a/scripts/copyright-update b/scripts/copyright-update index 6728fd9f..5a0ddd2c 100755 --- a/scripts/copyright-update +++ b/scripts/copyright-update @@ -17,7 +17,7 @@ getfiles () { 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 @@ -30,9 +30,9 @@ run () { 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 diff --git a/tests/scripts/features/reinvoke b/tests/scripts/features/reinvoke index d2a1f50c..657f6c9b 100644 --- a/tests/scripts/features/reinvoke +++ b/tests/scripts/features/reinvoke @@ -45,17 +45,17 @@ all: ; @echo hello 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'); diff --git a/tests/scripts/features/targetvars b/tests/scripts/features/targetvars index edc90b81..66c7ce2d 100644 --- a/tests/scripts/features/targetvars +++ b/tests/scripts/features/targetvars @@ -183,7 +183,7 @@ run_make_test(undef, 'foo PATTERN=yes', "ok ok foo pat\nok ok foo pat\n"); # (> 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) ',