diff options
Diffstat (limited to 'officecfg')
-rw-r--r-- | officecfg/CustomTarget_registry.mk (renamed from officecfg/registry/Makefile) | 44 | ||||
-rw-r--r-- | officecfg/Module_officecfg.mk | 1 | ||||
-rw-r--r-- | officecfg/Package_cppheader.mk | 11 |
3 files changed, 24 insertions, 32 deletions
diff --git a/officecfg/registry/Makefile b/officecfg/CustomTarget_registry.mk index 50d872c4c94c..8f5ea48e146d 100644 --- a/officecfg/registry/Makefile +++ b/officecfg/CustomTarget_registry.mk @@ -26,35 +26,37 @@ ## instead of those above. ## -WFDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) -gb_PARTIALBUILD := T -include $(GBUILDDIR)/gbuild_simple.mk -include $(WFDIR)/files.mk +OCDIR := $(SRCDIR)/officecfg/registry +include $(OCDIR)/files.mk -.DEFAULT_GOAL := all -.PHONY: all -all: $(foreach i,$(officecfg_FILES),$(i).hxx) +$(eval $(call gb_CustomTarget_CustomTarget,officecfg/registry,new_style)) -define my_target -$(if $(1),$(1)/$(if $(2),$(2)/))%.hxx: \ - $(WFDIR)/schema/org/openoffice/$(if $(1),$(1)/$(if $(2),$(2)/))%.xcs \ - $(WFDIR)/cppheader.xsl - $$(call gb_Helper_abbreviate_dirs_native,mkdir -p $$(dir $$@)) +OCRG := $(call gb_CustomTarget_get_workdir,officecfg/registry) + +$(call gb_CustomTarget_get_target,officecfg/registry) : \ + $(foreach i,$(officecfg_FILES),$(OCRG)/$(i).hxx) + +define oc_target +$(OCRG)/$(if $(1),$(1)/$(if $(2),$(2)/))%.hxx: \ + $(OCDIR)/schema/org/openoffice/$(if $(1),$(1)/$(if $(2),$(2)/))%.xcs \ + $(OCDIR)/cppheader.xsl | $(gb_XSLTPROCTARGET) + $$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),$(true),XSL,1) $$(call gb_Helper_abbreviate_dirs_native, \ - $$(gb_XSLTPROC) --nonet --stringparam ns1 \ + mkdir -p $$(dir $$@) && \ + $$(gb_XSLTPROC) --nonet --stringparam ns1 \ $(if $(1), \ $(1) --stringparam ns2 $(if $(2),$(2) --stringparam ns3)) $$* \ - -o $$@ $$(WFDIR)/cppheader.xsl $$<) + -o $$@ $(OCDIR)/cppheader.xsl $$<) endef # Sort longer paths before their prefixes, as at least GNU Make 3.81 on Mac OS X # appears to let % span sub-directories, so that the above rule would produce # unexpected results; sorting this way seems to avoid the problem: -$(eval $(call my_target,Office,DataAccess)) -$(eval $(call my_target,Office,OOoImprovement)) -$(eval $(call my_target,Office,UI)) -$(eval $(call my_target,Office)) -$(eval $(call my_target,TypeDetection)) -$(eval $(call my_target,ucb)) -$(eval $(call my_target)) +$(eval $(call oc_target,Office,DataAccess)) +$(eval $(call oc_target,Office,OOoImprovement)) +$(eval $(call oc_target,Office,UI)) +$(eval $(call oc_target,Office)) +$(eval $(call oc_target,TypeDetection)) +$(eval $(call oc_target,ucb)) +$(eval $(call oc_target)) diff --git a/officecfg/Module_officecfg.mk b/officecfg/Module_officecfg.mk index 50eab3e05f74..9b362cd9b57d 100644 --- a/officecfg/Module_officecfg.mk +++ b/officecfg/Module_officecfg.mk @@ -20,6 +20,7 @@ $(eval $(call gb_Module_Module,officecfg)) $(eval $(call gb_Module_add_targets,officecfg,\ + CustomTarget_registry \ Package_cppheader \ Package_misc \ Package_tools \ diff --git a/officecfg/Package_cppheader.mk b/officecfg/Package_cppheader.mk index 2a3b01f41bee..fb344bef77ff 100644 --- a/officecfg/Package_cppheader.mk +++ b/officecfg/Package_cppheader.mk @@ -30,16 +30,5 @@ include $(SRCDIR)/officecfg/registry/files.mk $(eval $(call gb_Package_Package,officecfg_cppheader,$(WORKDIR)/CustomTarget/officecfg/registry)) -$(eval $(call \ - gb_Package_add_customtarget,officecfg_cppheader,officecfg/registry)) - -$(eval $(call gb_CustomTarget_add_outdir_dependencies,officecfg/registry, \ - $(gb_XSLTPROCTARGET) \ -)) - -$(eval $(call gb_CustomTarget_add_dependencies,officecfg/registry, \ - officecfg/registry/cppheader.xsl \ - $(foreach i,$(officecfg_FILES),officecfg/registry/schema/org/openoffice/$(i).xcs))) - $(eval $(foreach i,$(officecfg_FILES),$(call \ gb_Package_add_file,officecfg_cppheader,inc/officecfg/$(i).hxx,$(i).hxx))) |