Some "install" and "clean" fixes
[ghc-hetmet.git] / utils / Makefile
index 73685d8..82eec81 100644 (file)
@@ -65,6 +65,8 @@ endif
 # sort removes duplicates - we don't actually care about the order
 WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1))
 
+clean:: $(foreach P,$(WITH_EITHER),clean.$P)
+
 with-bootstrapping-compiler: \
     $(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P)
 
@@ -72,6 +74,10 @@ with-stage-1: $(foreach P,$(WITH_STAGE1),with-stage-1.$P)
 
 install:: $(foreach P,$(WITH_STAGE1),install.$P)
 
+$(foreach P,$(WITH_EITHER),clean.$P): \
+clean.%:
+       $(MAKE) -C $* clean
+
 $(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P): \
 with-bootstrapping-compiler.%:
        $(MAKE) -C $* with-bootstrapping-compiler