diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-06-22 20:31:29 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-22 22:39:28 +0200 |
commit | 55c37591b63a5e9e7c8537679db8e92c7f0161c0 (patch) | |
tree | 90a28d63d3e01a358d75e31731abe24e7e2d8691 | |
parent | a84eb85c3575d5b6f79717904b6d55848bc2e84c (diff) |
gbuild: fix UnoApiTarget header dependencies:
The existing situtation of not having any explicit rules for header
files does not work because it requires a make restart after
the headers are generated in order for the headers to be delivered.
Because requiring running make twice to get a complete rebuild is bad,
add some rules to force the headers to be delivered immediately.
Change-Id: I5b4d5c8f8e9c9d7d0874fc797e62972eaa1dd904
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/UnoApi.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/UnoApiTarget.mk | 24 |
3 files changed, 28 insertions, 4 deletions
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 5a8650414d9e..60290af53a53 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -144,9 +144,9 @@ gb_SrsTemplatePartTarget_get_target = $(WORKDIR)/SrsTemplatePartTarget/$(firstwo gb_SrsTemplateTarget_get_include_dir = $(WORKDIR)/SrsTemplatePartTarget/$(firstword $(subst /, ,$(1))) gb_SrsTemplateTarget_get_target = $(WORKDIR)/SrsTemplateTarget/$(1) gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb -gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap -gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive -gb_UnoApiHeadersTarget_get_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal +gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap$(2) +gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive$(2) +gb_UnoApiHeadersTarget_get_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal$(2) gb_UnoApiHeadersTarget_get_bootstrap_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/bootstrap.done gb_UnoApiHeadersTarget_get_comprehensive_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/comprehensive.done gb_UnoApiHeadersTarget_get_target = $(WORKDIR)/UnoApiHeadersTarget/$(1)/normal.done diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk index 3619e9a2e9e9..18f1128e44ae 100644 --- a/solenv/gbuild/UnoApi.mk +++ b/solenv/gbuild/UnoApi.mk @@ -62,7 +62,7 @@ endef define gb_UnoApi__add_headerfile_impl $(call gb_Package_add_file,$(1)_inc,inc/$(2),$(3)) -$(call gb_UnoApiHeadersTarget_add_headerfile,$(1),$(3)) +$(call gb_UnoApiHeadersTarget_add_headerfile,$(1),$(2),$(3)) endef diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 206bbb9694d9..87fd57bb99d8 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -322,9 +322,33 @@ $(call gb_UnoApiHeadersTarget_get_target,$(1)) : UNOAPI_DEPS := $(call gb_UnoApiHeadersTarget_get_bootstrap_target,$(1)) : UNOAPI_DEPS := $(call gb_UnoApiHeadersTarget_get_comprehensive_target,$(1)) : UNOAPI_DEPS := +# need dummy recipes so that header files are delivered in Package_inc; +# otherwise make will consider the header to be up-to-date because it was +# actually built by the recipe for gb_UnoApiHeadersTarget_get_target +$(call gb_UnoApiHeadersTarget_get_dir,$(1),/%.hdl) : + touch $$@ + +$(call gb_UnoApiHeadersTarget_get_dir,$(1),/%.hpp) : + touch $$@ + +$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$(1),/%.hdl) : + touch $$@ + +$(call gb_UnoApiHeadersTarget_get_bootstrap_dir,$(1),/%.hpp) : + touch $$@ + +$(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$(1),/%.hdl) : + touch $$@ + +$(call gb_UnoApiHeadersTarget_get_comprehensive_dir,$(1),/%.hpp) : + touch $$@ + endef +# ensure that new urd triggers the dummy rule to rebuild the headers define gb_UnoApiHeadersTarget_add_headerfile +$(call gb_UnoApiHeadersTarget_get_dir,$(1),/$(3)) : \ + $(call gb_UnoApiPartTarget_get_target,$(basename $(2)).urd) endef |