summaryrefslogtreecommitdiff
path: root/utils/mkdirhier
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mkdirhier')
-rw-r--r--utils/mkdirhier/Makefile20
-rw-r--r--utils/mkdirhier/ghc.mk11
2 files changed, 14 insertions, 17 deletions
diff --git a/utils/mkdirhier/Makefile b/utils/mkdirhier/Makefile
index 0e32bbbde4..879e170be5 100644
--- a/utils/mkdirhier/Makefile
+++ b/utils/mkdirhier/Makefile
@@ -1,17 +1,3 @@
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-
-boot :: all
-
-PROG=mkdirhier
-CLEAN_FILES += $(PROG)
-all::
- $(RM) -f $(PROG)
- echo '#!$(SHELL)' >> $(PROG)
- cat $(PROG).sh >> $(PROG)
- $(EXECUTABLE_FILE) $(PROG)
-
-BINDIST_EXTRAS += $(PROG)
-include $(TOP)/mk/bindist.mk
-
-include $(TOP)/mk/target.mk
+dir = utils/mkdirhier
+TOP = ../..
+include $(TOP)/mk/sub-makefile.mk
diff --git a/utils/mkdirhier/ghc.mk b/utils/mkdirhier/ghc.mk
new file mode 100644
index 0000000000..59ad53fe69
--- /dev/null
+++ b/utils/mkdirhier/ghc.mk
@@ -0,0 +1,11 @@
+$(MKDIRHIER) : utils/mkdirhier/mkdirhier.sh
+ -mkdir $(INPLACE)
+ -mkdir $(INPLACE_BIN)
+ -mkdir $(INPLACE_LIB)
+ $(RM) -f $@
+ echo '#!$(SHELL)' >> $@
+ cat utils/mkdirhier/mkdirhier.sh >> $@
+ $(EXECUTABLE_FILE) $@
+
+$(eval $(call all-target,utils/mkdirhier,$(MKDIRHIER)))
+$(eval $(call clean-target,utils/mkdirhier,,$(MKDIRHIER)))