Commit 80fcdd69 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Put the generated Parser.y under compiler/stage<n>/build; fixes #7195

parent 70c64164
......@@ -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)))
......
......@@ -26,6 +26,12 @@ $1/$2/build/%.hs : $1/$4/%.ly | $$$$(dir $$$$@)/.
$1/$2/build/%.hs : $1/$4/%.y | $$$$(dir $$$$@)/.
$$(call cmd,HAPPY) $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@
$1/$2/build/%.hs : $1/$2/build/%.ly | $$$$(dir $$$$@)/.
$$(call cmd,HAPPY) $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@
$1/$2/build/%.hs : $1/$2/build/%.y | $$$$(dir $$$$@)/.
$$(call cmd,HAPPY) $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@
$1/$2/build/%.hs : $1/$4/%.x | $$$$(dir $$$$@)/.
$$(call cmd,ALEX) $$($1_$2_$3_ALL_ALEX_OPTS) $$< -o $$@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment