diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /build/pymake/tests/automatic-variables.mk | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'build/pymake/tests/automatic-variables.mk')
-rw-r--r-- | build/pymake/tests/automatic-variables.mk | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/build/pymake/tests/automatic-variables.mk b/build/pymake/tests/automatic-variables.mk new file mode 100644 index 000000000..5302c08ea --- /dev/null +++ b/build/pymake/tests/automatic-variables.mk @@ -0,0 +1,79 @@ +$(shell \ +mkdir -p src/subd; \ +mkdir subd; \ +touch dummy; \ +sleep 2; \ +touch subd/test.out src/subd/test.in2; \ +sleep 2; \ +touch subd/test.out2 src/subd/test.in; \ +sleep 2; \ +touch subd/host_test.out subd/host_test.out2; \ +sleep 2; \ +touch host_prog; \ +) + +VPATH = src + +all: prog host_prog prog dir/ + test "$@" = "all" + test "$<" = "prog" + test "$^" = "prog host_prog dir" + test "$?" = "prog host_prog dir" + test "$+" = "prog host_prog prog dir" + test "$(@D)" = "." + test "$(@F)" = "all" + test "$(<D)" = "." + test "$(<F)" = "prog" + test "$(^D)" = ". . ." + test "$(^F)" = "prog host_prog dir" + test "$(?D)" = ". . ." + test "$(?F)" = "prog host_prog dir" + test "$(+D)" = ". . . ." + test "$(+F)" = "prog host_prog prog dir" + @echo TEST-PASS + +dir/: + test "$@" = "dir" + test "$<" = "" + test "$^" = "" + test "$(@D)" = "." + test "$(@F)" = "dir" + mkdir $@ + +prog: subd/test.out subd/test.out2 + test "$@" = "prog" + test "$<" = "subd/test.out" + test "$^" = "subd/test.out subd/test.out2" # ^ + test "$?" = "subd/test.out subd/test.out2" # ? + cat $< + test "$$(cat $<)" = "remade" + test "$$(cat $(word 2,$^))" = "" + +host_prog: subd/host_test.out subd/host_test.out2 + @echo TEST-FAIL No need to remake + +%.out: %.in dummy + test "$@" = "subd/test.out" + test "$*" = "subd/test" # * + test "$<" = "src/subd/test.in" # < + test "$^" = "src/subd/test.in dummy" # ^ + test "$?" = "src/subd/test.in" # ? + test "$+" = "src/subd/test.in dummy" # + + test "$(@D)" = "subd" + test "$(@F)" = "test.out" + test "$(*D)" = "subd" + test "$(*F)" = "test" + test "$(<D)" = "src/subd" + test "$(<F)" = "test.in" + test "$(^D)" = "src/subd ." # ^D + test "$(^F)" = "test.in dummy" + test "$(?D)" = "src/subd" + test "$(?F)" = "test.in" + test "$(+D)" = "src/subd ." # +D + test "$(+F)" = "test.in dummy" + printf "remade" >$@ + +%.out2: %.in2 dummy + @echo TEST_FAIL No need to remake + +.PHONY: all |