summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-02-23 03:40:34 -0600
committerAustin Seipp <austin@well-typed.com>2015-02-23 03:40:34 -0600
commita0ef626e8c51784cc0bf9b33e3c5b3e750b2786b (patch)
treeb04a6c1ee4be663f8c51a8062d22c1cadfd6b297 /testsuite/tests/ghc-api
parent30dc59e889205ee62ce77168616f7a4183811d74 (diff)
downloadhaskell-a0ef626e8c51784cc0bf9b33e3c5b3e750b2786b.tar.gz
Declare some Makefile targets to be PHONY
Summary: Given: a Makefile with a non-PHONY target called `target` If: after running `make target`, a file exists with the same name as `target` (it was either already there, or it was created by running `make target`) And: `target` has no dependencies, such as `clean`, that modify or delete that file Then: subsequent invocations of `make target` will not have any effect. Solution: make `target` PHONY. BAD: ``` foo: ... ./foo ``` BETTER: ``` foo: ... ./foo .PHONY: foo ``` Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D670
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r--testsuite/tests/ghc-api/T7478/Makefile1
-rw-r--r--testsuite/tests/ghc-api/annotations-literals/Makefile2
-rw-r--r--testsuite/tests/ghc-api/annotations/Makefile2
-rw-r--r--testsuite/tests/ghc-api/landmines/Makefile2
-rw-r--r--testsuite/tests/ghc-api/show-srcspan/Makefile2
5 files changed, 5 insertions, 4 deletions
diff --git a/testsuite/tests/ghc-api/T7478/Makefile b/testsuite/tests/ghc-api/T7478/Makefile
index 1afb16d7d4..6214051982 100644
--- a/testsuite/tests/ghc-api/T7478/Makefile
+++ b/testsuite/tests/ghc-api/T7478/Makefile
@@ -9,3 +9,4 @@ T7478: clean
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 -package ghc T7478.hs
./T7478 "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
+.PHONY: clean T7478
diff --git a/testsuite/tests/ghc-api/annotations-literals/Makefile b/testsuite/tests/ghc-api/annotations-literals/Makefile
index 875d063ceb..5b06030695 100644
--- a/testsuite/tests/ghc-api/annotations-literals/Makefile
+++ b/testsuite/tests/ghc-api/annotations-literals/Makefile
@@ -15,4 +15,4 @@ parsed:
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 -package ghc parsed
./parsed "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
-.PHONY: clean
+.PHONY: clean literals parsed
diff --git a/testsuite/tests/ghc-api/annotations/Makefile b/testsuite/tests/ghc-api/annotations/Makefile
index 61474e9b0e..f5ef3b4a18 100644
--- a/testsuite/tests/ghc-api/annotations/Makefile
+++ b/testsuite/tests/ghc-api/annotations/Makefile
@@ -26,4 +26,4 @@ exampleTest:
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 -package ghc exampleTest
./exampleTest "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
-.PHONY: clean
+.PHONY: clean annotations parseTree comments exampleTest
diff --git a/testsuite/tests/ghc-api/landmines/Makefile b/testsuite/tests/ghc-api/landmines/Makefile
index 3197647a49..c727b95e66 100644
--- a/testsuite/tests/ghc-api/landmines/Makefile
+++ b/testsuite/tests/ghc-api/landmines/Makefile
@@ -10,4 +10,4 @@ landmines: clean
./landmines "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
-.PHONY: clean
+.PHONY: clean landmines
diff --git a/testsuite/tests/ghc-api/show-srcspan/Makefile b/testsuite/tests/ghc-api/show-srcspan/Makefile
index e467b61d75..8adcaa4f80 100644
--- a/testsuite/tests/ghc-api/show-srcspan/Makefile
+++ b/testsuite/tests/ghc-api/show-srcspan/Makefile
@@ -10,4 +10,4 @@ showsrcspan: clean
./showsrcspan "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
-.PHONY: clean
+.PHONY: clean showsrcspan