X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FMakefile;h=03f09405b2801c461c0853819c1a31a22086ef70;hb=3f44fb8231db3277a584470cbe7397bec801cd0e;hp=69b290340c55ea1eaed97412a6032327a1173123;hpb=894775f034d278ff5493eeaf8587914626e8df21;p=ghc-hetmet.git diff --git a/compiler/Makefile b/compiler/Makefile index 69b2903..03f0940 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -56,7 +56,7 @@ stage3 :: $(MAKE) stage=3 ifeq "$(CLEAN_ALL_STAGES)" "YES" -clean distclean:: +clean distclean maintainer-clean:: $(RM) -f prelude/primops.txt $(RM) -f $(PRIMOP_BITS) $(RM) -f $(CONFIG_HS) @@ -66,13 +66,13 @@ clean distclean:: endif ifeq "$(CLEAN_ALL_STAGES)" "YES" -clean distclean:: clean.stage.1 clean.stage.2 clean.stage.3 +clean distclean maintainer-clean:: clean.stage.1 clean.stage.2 clean.stage.3 else -clean distclean:: clean.stage.$(stage) +clean distclean maintainer-clean:: clean.stage.$(stage) endif ifeq "$(CLEAN_ALL_STAGES)" "YES" -distclean:: +distclean maintainer-clean:: $(RM) -f ghc.cabal endif @@ -189,7 +189,13 @@ CONFIGURE_FLAGS_STAGE1 += $(USE_BOOT_CONFIGURE_FLAGS) CONFIGURE_FLAGS_STAGE2 += $(USE_STAGE1_CONFIGURE_FLAGS) CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS) -boot.stage.%: $(PRIMOP_BITS) $(CONFIG_HS) parser/Parser.y +# In a source dist we don't need to worry about Parser.y(.pp) as we have +# the .hs file pre-generated +ifneq "$(wildcard parser/Parser.y.pp)" "" +PARSER_Y = parser/Parser.y +endif + +boot.stage.%: $(PRIMOP_BITS) $(CONFIG_HS) $(PARSER_Y) test -f $(STAGE3_PACKAGE_CONF) || echo "[]" > $(STAGE3_PACKAGE_CONF) $(CABAL) configure --distpref dist-stage$* \ $(CONFIGURE_FLAGS_STAGE$*) \