diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-10-10 02:12:56 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-10 02:12:56 +0100 |
commit | 80fcdd69172f2e9d50b2d058c48dbc6074b7a65c (patch) | |
tree | b3fc1fcc53452d58bb89db98023818efe56a3bfa /compiler/ghc.mk | |
parent | 70c641642d3c3d55e4f8f76b49e3f82fb9f81a20 (diff) | |
download | haskell-80fcdd69172f2e9d50b2d058c48dbc6074b7a65c.tar.gz |
Put the generated Parser.y under compiler/stage<n>/build; fixes #7195
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r-- | compiler/ghc.mk | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index a0754af5c2..7556acea64 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -247,7 +247,18 @@ PRIMOP_BITS = compiler/primop-data-decl.hs-incl \ compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) compiler_CPP_OPTS += ${GhcCppOpts} -$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H) +define preprocessCompilerFiles +# $0 = stage +compiler/stage$1/build/Parser.y: compiler/parser/Parser.y.pp + $$(CPP) $$(RAWCPP_FLAGS) -P $$(compiler_CPP_OPTS) -x c $$< | grep -v '^#pragma GCC' > $$@ +endef + +$(eval $(call preprocessCompilerFiles,1)) +$(eval $(call preprocessCompilerFiles,2)) +$(eval $(call preprocessCompilerFiles,3)) + + +$(PRIMOPS_TXT): %: %.pp compiler/stage1/$(PLATFORM_H) $(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@ $(eval $(call clean-target,compiler,primop, $(PRIMOPS_TXT) compiler/parser/Parser.y $(PRIMOP_BITS))) |