Convert [ ... ] to test ... in scripting.

The "[" link may be missing during OS boostrapping.

* build.sh: Convert "[ ... ]" to "test ..."
* maintMakefile: Ditto.
* scripts/copyright-update: Ditto
* tests/scripts/features/reinvoke: Ditto
* tests/scripts/features/targetvars: Ditto
This commit is contained in:
Paul Smith
2020-05-03 13:39:55 -04:00
parent a015d1f822
commit c8a6263eb5
5 changed files with 16 additions and 16 deletions

View File

@@ -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');

View File

@@ -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)
',