Fix install when INSTALL_LIBEXEC_SCRIPTS = ""
[ghc-hetmet.git] / compiler / ghc.mk
index 498e8dc..6f78192 100644 (file)
@@ -141,8 +141,7 @@ $(eval $(call clean-target,compiler,config_hs,$(compiler_CONFIG_HS)))
 
 PLATFORM_H = ghc_boot_platform.h
 
-compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk
-       "$(MKDIRHIER)" $(dir $@)
+compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
        "$(RM)" $(RM_OPTS) $@
        @echo "Creating $@..."
        @echo "#ifndef __PLATFORM_H__"  >$@
@@ -188,8 +187,7 @@ endif
 # For stage2 and above, the BUILD platform is the HOST of stage1, and
 # the HOST platform is the TARGET of stage1.  The TARGET remains the same
 # (stage1 is the cross-compiler, not stage2).
-compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk
-       "$(MKDIRHIER)" $(dir $@)
+compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
        "$(RM)" $(RM_OPTS) $@
        @echo "Creating $@..."
        @echo "#ifndef __PLATFORM_H__"  >$@
@@ -414,9 +412,14 @@ compiler_PACKAGE = ghc
 # when it gets registered; see Note [munge-stage1-package-config]
 # below.
 ifneq "$(ProjectPatchLevel)" "0"
+
 define compiler_PACKAGE_MAGIC
 compiler_stage1_VERSION = $(subst .$(ProjectPatchLevel),,$(ProjectVersion))
 endef
+
+# Don't register the non-munged package
+compiler_stage1_REGISTER_PACKAGE = NO
+
 endif
 
 # haddocking only happens for stage2