This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force LF line endings for test makefiles.
- Loading branch information
Showing
5 changed files
with
65 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) "$@" |