diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-04-14 22:48:55 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-04-16 13:56:29 +0200 |
commit | b5607764171b8364b5e89948a2a5c3ab9749a160 (patch) | |
tree | 906eec976638df4dd9aeeaf2973abe2b3895df1e | |
parent | c5285699162ad2888c7df015cdf035ab5bf00379 (diff) |
YaccTarget and headers cleaning
-rw-r--r-- | idlc/Executable_idlc.mk | 3 | ||||
-rw-r--r-- | rsc/Executable_rsc.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 36 |
3 files changed, 16 insertions, 26 deletions
diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk index 7e19722c8f2f..4319857d8cf7 100644 --- a/idlc/Executable_idlc.mk +++ b/idlc/Executable_idlc.mk @@ -27,7 +27,6 @@ $(eval $(call gb_Executable_Executable,idlc)) $(eval $(call gb_Executable_set_include,idlc,\ - -I$(WORKDIR)/YaccTarget/idlc/source \ -I$(SRCDIR)/idlc/inc \ -I$(SRCDIR)/idlc/source \ $$(INCLUDE) \ @@ -43,8 +42,6 @@ $(eval $(call gb_Executable_add_grammars,idlc,\ idlc/source/parser \ )) -$(WORKDIR)/GenCxxObject/YaccTarget/idlc/source/parser.o: T_CXXFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS) - $(eval $(call gb_Executable_use_custom_headers,idlc,idlc/scanner)) $(eval $(call gb_Executable_add_exception_objects,idlc,\ diff --git a/rsc/Executable_rsc.mk b/rsc/Executable_rsc.mk index 9c0f1e3df231..c9a1360c6ce9 100644 --- a/rsc/Executable_rsc.mk +++ b/rsc/Executable_rsc.mk @@ -31,7 +31,6 @@ $(eval $(call gb_Executable_Executable,rsc)) $(eval $(call gb_Executable_set_include,rsc,\ $$(INCLUDE) \ -I$(SRCDIR)/rsc/inc \ - -I$(WORKDIR)/YaccTarget/rsc/source/parser \ )) $(eval $(call gb_Executable_use_api,rsc,\ @@ -55,8 +54,6 @@ $(eval $(call gb_Executable_add_grammars,rsc,\ rsc/source/parser/rscyacc \ )) -$(WORKDIR)/GenCxxObject/YaccTarget/rsc/source/parser/rscyacc.o: T_CXXFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS) - $(eval $(call gb_Executable_add_exception_objects,rsc,\ rsc/source/parser/erscerr \ rsc/source/parser/rscdb \ diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index dc752001ac53..cde46b074997 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -197,7 +197,7 @@ gb_YaccTarget_get_source = $(1)/$(2).y .PHONY : $(call gb_YaccTarget_get_clean_target,%) $(call gb_YaccTarget_get_clean_target,%) : - $(call gb_Output_announce,$(2),$(false),YAC,3) + $(call gb_Output_announce,$*,$(false),YAC,3) $(call gb_Helper_abbreviate_dirs,\ rm -f $(call gb_YaccTarget_get_grammar_target,$*) $(call gb_YaccTarget_get_header_target,$*) $(call gb_YaccTarget_get_target,$*)) @@ -547,6 +547,15 @@ endif endef +define gb_LinkTarget__add_include +$(call gb_LinkTarget_get_headers_target,$(1)) \ +$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += -I$(2) +ifeq ($(gb_FULLDEPS),$(true)) +$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += -I$(2) +endif + +endef + define gb_LinkTarget_set_include $(call gb_LinkTarget_get_headers_target,$(1)) \ $(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $(2) @@ -584,24 +593,14 @@ $$(call gb_Output_error,\ endef define gb_LinkTarget_use_api -$(call gb_LinkTarget_get_external_headers_target,$(1)) :| \ - $$(foreach api,$(2),$$(call gb_Package_get_target,$$(api)_inc)) -$(call gb_LinkTarget_get_headers_target,$(1)) \ -$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += $$(foreach api,$(2),-I$(OUTDIR)/inc/$$(api)) -ifeq ($(gb_FULLDEPS),$(true)) -$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += $$(foreach api,$(2),-I$(OUTDIR)/inc/$$(api)) -endif +$(foreach api,$(2),$(call gb_LinkTarget__use_internal_api_one,$(1),$(api))) endef define gb_LinkTarget__use_internal_api_one $(call gb_LinkTarget_get_external_headers_target,$(1)) :| \ - $(call gb_UnoApiHeadersTarget_get_$(3)target,$(api)) -$(call gb_LinkTarget_get_headers_target,$(1)) \ -$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += -I$(call gb_UnoApiHeadersTarget_get_$(3)dir,$(api)) -ifeq ($(gb_FULLDEPS),$(true)) -$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += -I$(call gb_UnoApiHeadersTarget_get_$(3)dir,$(api)) -endif + $(call gb_UnoApiHeadersTarget_get_$(3)target,$(2)) +$(call gb_LinkTarget__add_include,$(1),$(call gb_UnoApiHeadersTarget_get_$(3)dir,$(2))) endef @@ -831,9 +830,10 @@ endef # gb_LinkTarget_add_grammar(<component>,<grammar file>) define gb_LinkTarget_add_grammar $(call gb_YaccTarget_YaccTarget,$(2)) -$(call gb_LinkTarget_add_generated_cxx_object,$(1),YaccTarget/$(2)) +$(call gb_LinkTarget_add_generated_exception_object,$(1),YaccTarget/$(2)) $(call gb_LinkTarget_get_clean_target,$(1)) : $(call gb_YaccTarget_get_clean_target,$(2)) $(call gb_LinkTarget__add_internal_headers,$(1),$(call gb_YaccTarget_get_header_target,$(2))) +$(call gb_LinkTarget__add_include,$(1),$(dir $(call gb_YaccTarget_get_header_target,$(2)))) endef @@ -976,11 +976,7 @@ endef define gb_LinkTarget__use_custom_headers $(call gb_LinkTarget_get_external_headers_target,$(1)) :| \ $(call gb_CustomTarget_get_target,$(2)) -$(call gb_LinkTarget_get_headers_target,$(1)) \ -$(call gb_LinkTarget_get_target,$(1)) : INCLUDE += -I$(call gb_CustomTarget_get_workdir,$(2)) -ifeq ($(gb_FULLDEPS),$(true)) -$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE += -I$(call gb_CustomTarget_get_workdir,$(2)) -endif +$(call gb_LinkTarget__add_include,$(1),$(call gb_CustomTarget_get_workdir,$(2))) endef |