created cleanrules.mk
authorPatrik Gornicz <Gornicz.P@gmail.com>
Wed, 1 Jul 2009 19:05:40 +0000 (15:05 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Wed, 1 Jul 2009 19:05:40 +0000 (15:05 -0400)
Makefile.d/cleanrules.mk [new file with mode: 0644]
lib/rules.mk
tests/rules.mk

diff --git a/Makefile.d/cleanrules.mk b/Makefile.d/cleanrules.mk
new file mode 100644 (file)
index 0000000..5fa7307
--- /dev/null
@@ -0,0 +1,36 @@
+
+# Clean rules that packages can include
+#
+# Requires T to be set to the desired suffix
+
+L_CLEANCMDS +=  cleanbin-$T
+cleanbin:       cleanbin-$T
+.PHONY:         cleanbin-$T
+cleanbin-$T:
+       ${Q1}${PRNTFMT} "rm" "${BINDIR}"
+       ${Q2}rm -rf ${BINDIR}
+
+L_CLEANCMDS +=  cleanobjs-$T
+cleanobjs:      cleanobjs-$T
+.PHONY:         cleanobjs-$T
+cleanobjs-$T:
+       ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
+       ${Q2}rm -rf ${OBJSDIR}
+
+L_CLEANCMDS +=  cleandeps-$T
+cleandeps:      cleandeps-$T
+.PHONY:         cleandeps-$T
+cleandeps-$T:
+       ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
+       ${Q2}rm -rf ${DEPSDIR}
+
+L_CLEANCMDS +=  clean-$T
+clean:          clean-$T
+.PHONY:         clean-$T
+clean-$T: cleanobjs-$T cleanbin-$T
+
+L_CLEANCMDS +=  cleanall-$T
+cleanall:       cleanall-$T
+.PHONY:         cleanall-$T
+cleanall-$T: cleanbin-$T cleanobjs-$T cleandeps-$T
+
index f13cda2..2b50788 100644 (file)
@@ -37,33 +37,7 @@ ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D}
        ${cmd-cpptodep}
 
 
-L_CLEANCMDS +=  cleanbin-$P
-cleanbin:       cleanbin-$P
-.PHONY:         cleanbin-$P
-cleanbin-$P:
-       ${Q1}${PRNTFMT} "rm" "${BINDIR}"
-       ${Q2}rm -rf ${BINDIR}
+T := $P
+    include Makefile.d/cleanrules.mk
+T :=
 
-L_CLEANCMDS +=  cleanobjs-$P
-cleanobjs:      cleanobjs-$P
-.PHONY:         cleanobjs-$P
-cleanobjs-$P:
-       ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
-       ${Q2}rm -rf ${OBJSDIR}
-
-L_CLEANCMDS +=  cleandeps-$P
-cleandeps:      cleandeps-$P
-.PHONY:         cleandeps-$P
-cleandeps-$P:
-       ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
-       ${Q2}rm -rf ${DEPSDIR}
-
-L_CLEANCMDS +=  clean-$P
-clean:          clean-$P
-.PHONY:         clean-$P
-clean-$P: cleanobjs-$P cleanbin-$P
-
-L_CLEANCMDS +=  cleanall-$P
-cleanall:       cleanall-$P
-.PHONY:         cleanall-$P
-cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P
index 0c5bcf1..9639031 100644 (file)
@@ -15,34 +15,7 @@ ${DEPSDIR_$P}%.d: ${SRCSDIR_$P}%.cpp | $${@D}
        ${cmd-cpptodep}
 
 
-L_CLEANCMDS +=  cleanbin-$P
-cleanbin:       cleanbin-$P
-.PHONY:         cleanbin-$P
-cleanbin-$P:
-       ${Q1}${PRNTFMT} "rm" "${BINDIR}"
-       ${Q2}rm -rf ${BINDIR}
-
-L_CLEANCMDS +=  cleanobjs-$P
-cleanobjs:      cleanobjs-$P
-.PHONY:         cleanobjs-$P
-cleanobjs-$P:
-       ${Q1}${PRNTFMT} "rm" "${OBJSDIR}"
-       ${Q2}rm -rf ${OBJSDIR}
-
-L_CLEANCMDS +=  cleandeps-$P
-cleandeps:      cleandeps-$P
-.PHONY:         cleandeps-$P
-cleandeps-$P:
-       ${Q1}${PRNTFMT} "rm" "${DEPSDIR}"
-       ${Q2}rm -rf ${DEPSDIR}
-
-L_CLEANCMDS +=  clean-$P
-clean:          clean-$P
-.PHONY:         clean-$P
-clean-$P: cleanobjs-$P cleanbin-$P
-
-L_CLEANCMDS +=  cleanall-$P
-cleanall:       cleanall-$P
-.PHONY:         cleanall-$P
-cleanall-$P: cleanbin-$P cleanobjs-$P cleandeps-$P
+T := $P
+    include Makefile.d/cleanrules.mk
+T :=