projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
GHC new build system megapatch
[ghc-hetmet.git]
/
rules
/
clean-target.mk
diff --git a/rules/clean-target.mk
b/rules/clean-target.mk
new file mode 100644
(file)
index 0000000..
12c7528
--- /dev/null
+++ b/
rules/clean-target.mk
@@ -0,0
+1,9
@@
+
+define clean-target # args: $1 = dir, $2 = key, $3 = files/dirs to clean
+clean : clean_$1
+.PHONY: clean_$1
+clean_$1 : clean_$1_$2
+.PHONY: clean_$1_$2
+clean_$1_$2:
+ $(RM) -rf $3
+endef