From da8b5ad80194b22681b3f7842e0c4b61ffe28c44 Mon Sep 17 00:00:00 2001 From: Kim Grasman Date: Thu, 3 Jul 2014 22:33:49 +0200 Subject: [PATCH] Force LF line endings for test makefiles. --- tests/include-regen2.mk | 20 +++++++------- tests/include-regen3.mk | 20 +++++++------- tests/justprint-native.mk | 56 +++++++++++++++++++-------------------- tests/justprint.mk | 10 +++---- tests/native-simple.mk | 24 ++++++++--------- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/tests/include-regen2.mk b/tests/include-regen2.mk index fc7fef0..53b8d69 100644 --- a/tests/include-regen2.mk +++ b/tests/include-regen2.mk @@ -1,10 +1,10 @@ -# make should make makefiles that it has rules for if they are -# included -include test.mk - -all: - test "$(X)" = "1" - @echo "TEST-PASS" - -test.mk: - @echo "X = 1" > $@ +# make should make makefiles that it has rules for if they are +# included +include test.mk + +all: + test "$(X)" = "1" + @echo "TEST-PASS" + +test.mk: + @echo "X = 1" > $@ diff --git a/tests/include-regen3.mk b/tests/include-regen3.mk index 878ce0a..832e549 100644 --- a/tests/include-regen3.mk +++ b/tests/include-regen3.mk @@ -1,10 +1,10 @@ -# make should make makefiles that it has rules for if they are -# included --include test.mk - -all: - test "$(X)" = "1" - @echo "TEST-PASS" - -test.mk: - @echo "X = 1" > $@ +# make should make makefiles that it has rules for if they are +# included +-include test.mk + +all: + test "$(X)" = "1" + @echo "TEST-PASS" + +test.mk: + @echo "X = 1" > $@ diff --git a/tests/justprint-native.mk b/tests/justprint-native.mk index 580e402..74ee5b1 100644 --- a/tests/justprint-native.mk +++ b/tests/justprint-native.mk @@ -1,28 +1,28 @@ -## $(TOUCH) and $(RM) are native commands in pymake. -## Test that pymake --just-print just prints them. - -ifndef TOUCH -TOUCH = touch -endif - -all: - $(RM) justprint-native-file1.txt - $(TOUCH) justprint-native-file2.txt - $(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log -# make --just-print shouldn't have actually done anything. - test ! -f justprint-native-file1.txt - test -f justprint-native-file2.txt -# but it should have printed each command - grep -q 'touch justprint-native-file1.txt' justprint.log - grep -q 'rm -f justprint-native-file2.txt' justprint.log - grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log -# tidy up - $(RM) justprint-native-file2.txt - @echo TEST-PASS - -justprint_target: - $(TOUCH) justprint-native-file1.txt - $(RM) justprint-native-file2.txt - this string is "unlikely to appear in the log by chance" - -.PHONY: justprint_target +## $(TOUCH) and $(RM) are native commands in pymake. +## Test that pymake --just-print just prints them. + +ifndef TOUCH +TOUCH = touch +endif + +all: + $(RM) justprint-native-file1.txt + $(TOUCH) justprint-native-file2.txt + $(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log +# make --just-print shouldn't have actually done anything. + test ! -f justprint-native-file1.txt + test -f justprint-native-file2.txt +# but it should have printed each command + grep -q 'touch justprint-native-file1.txt' justprint.log + grep -q 'rm -f justprint-native-file2.txt' justprint.log + grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log +# tidy up + $(RM) justprint-native-file2.txt + @echo TEST-PASS + +justprint_target: + $(TOUCH) justprint-native-file1.txt + $(RM) justprint-native-file2.txt + this string is "unlikely to appear in the log by chance" + +.PHONY: justprint_target diff --git a/tests/justprint.mk b/tests/justprint.mk index be11ba8..277b840 100644 --- a/tests/justprint.mk +++ b/tests/justprint.mk @@ -1,5 +1,5 @@ -#T commandline: ['-n'] - -all: - false # without -n, we wouldn't get past this - TEST-PASS # heh +#T commandline: ['-n'] + +all: + false # without -n, we wouldn't get past this + TEST-PASS # heh diff --git a/tests/native-simple.mk b/tests/native-simple.mk index 626a586..650d1db 100644 --- a/tests/native-simple.mk +++ b/tests/native-simple.mk @@ -1,12 +1,12 @@ -ifndef TOUCH -TOUCH = touch -endif - -all: testfile {testfile2} (testfile3) - test -f testfile - test -f {testfile2} - test -f "(testfile3)" - @echo TEST-PASS - -testfile {testfile2} (testfile3): - $(TOUCH) "$@" +ifndef TOUCH +TOUCH = touch +endif + +all: testfile {testfile2} (testfile3) + test -f testfile + test -f {testfile2} + test -f "(testfile3)" + @echo TEST-PASS + +testfile {testfile2} (testfile3): + $(TOUCH) "$@"