modified tools/rbuild/backend/mingw/compilers/gcc.mak

modified   tools/rbuild/backend/mingw/compilers/msc.mak
   New rules for C preprocessor that compiles to standard output (RBUILD_PIPE_CPP, RBUILD_PIPE_CXX_CPP)

modified   tools/rbuild/backend/mingw/rules.mak
   Use RBUILD_PIPE_CPP in RBUILD_WRC_RULE, instead of hardcoding GCC

svn path=/trunk/; revision=41459
This commit is contained in:
KJK::Hyperion 2009-06-19 02:28:33 +00:00
parent f073fbe6ab
commit 591cbf3208
3 changed files with 15 additions and 6 deletions

View file

@ -30,12 +30,16 @@ $(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
endef
#(source, cflags)
RBUILD_PIPE_CPP=$${gcc} $(2) -xc -E $(1)
RBUILD_PIPE_CXX_CPP=$${gpp} $(2) -E $(1)
#(module, source, dependencies, cflags, output)
define RBUILD_CPP
$(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
$$(ECHO_CPP)
$${gcc} -xc -E $(4) $$< > $$@
${call RBUILD_PIPE_CPP,$$<,$(4)} > $$@
endef
@ -44,7 +48,7 @@ define RBUILD_CXX_CPP
$(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
$$(ECHO_CPP)
$${gpp} -E $(4) $$< > $$@
${call RBUILD_PIPE_CXX_CPP,$$<,$(4)} > $$@
endef

View file

@ -23,17 +23,22 @@ RBUILD_CL_DEPENDS=$$(error Full dependencies are not implemented for Microsoft C
RBUILD_DEPENDS=${call RBUILD_CL_DEPENDS,$(1),$(2),$(3),$(4) /TC,$(5)}
RBUILD_CXX_DEPENDS=${call RBUILD_CL_DEPENDS,$(1),$(2),$(3),$(4) /TP,$(5)}
#(source, cflags)
RBUILD_PIPE_CL_CPP=$${cl} $(2) /E $(1)
RBUILD_PIPE_CPP=${call RBUILD_PIPE_CL_CPP,$(1),$(2) /TC}
RBUILD_PIPE_CXX_CPP=${call RBUILD_PIPE_CL_CPP,$(1),$(2) /TP}
#(module, source, dependencies, cflags, output)
define RBUILD_CL_CPP
$(5): $(2) $(3) $$(RBUILD_HELPER_TARGET) | ${call RBUILD_dir,$(5)}
$$(ECHO_CPP)
$${cl} /E $(4) $$< > $$@
${call RBUILD_PIPE_CL_CPP,$$<,$(4)} > $$@
endef
RBUILD_CPP=${call RBUILD_CL_CPP,$(1),$(2),$(3),$(4) /TC,$(5)}
RBUILD_CXX_CPP=${call RBUILD_CL_CPP,$(1),$(2),$(3),$(4) /TPP,$(5)}
RBUILD_CXX_CPP=${call RBUILD_CL_CPP,$(1),$(2),$(3),$(4) /TP,$(5)}
#(module, source, dependencies, cflags, output)
define RBUILD_CC

View file

@ -209,13 +209,13 @@ ${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_rc_pp_flags,$(1),$(4)},${call RBU
${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d $(3) $$(WRC_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
$$(ECHO_RC)
$${gcc} -xc ${call RBUILD_rc_pp_flags,$(1),$(4)} -E $$< | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
else
${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) $(3) $$(WRC_TARGET) | ${call RBUILD_intermediate_dir,$(2)}
$$(ECHO_RC)
$${gcc} -xc ${call RBUILD_rc_pp_flags,$(1),$(4)} -E $$< | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}}
endif