Skip to content
Browse files

Don't require Parser.y in a source dist

  • Loading branch information...
1 parent 027caa7 commit e0f3f5f3d0f70a5c128343ac16b815e73f1c1827 @igfoo igfoo committed Sep 19, 2008
Showing with 7 additions and 1 deletion.
  1. +7 −1 compiler/Makefile
View
8 compiler/Makefile
@@ -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$*) \

0 comments on commit e0f3f5f

Please sign in to comment.
Something went wrong with that request. Please try again.