diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-05-02 11:19:38 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-05-03 16:06:14 +0200 |
commit | 0c4c84a14b01c71c76a9c45a7f26aec4d64f3e4f (patch) | |
tree | 7d4be7e8156d2fcdb85fb00bf60f32200054fe24 /i18npool | |
parent | d19b79e4b4998eddd1baa1ab6a42c4f557889a60 (diff) |
makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo
The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.
Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/CustomTarget_breakiterator.mk | 2 | ||||
-rw-r--r-- | i18npool/CustomTarget_collator.mk | 2 | ||||
-rw-r--r-- | i18npool/CustomTarget_indexentry.mk | 6 | ||||
-rw-r--r-- | i18npool/CustomTarget_localedata.mk | 8 | ||||
-rw-r--r-- | i18npool/CustomTarget_textconversion.mk | 6 | ||||
-rw-r--r-- | i18npool/Library_i18npool.mk | 12 |
6 files changed, 18 insertions, 18 deletions
diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk index 80ad2d99bd7b..177966f7952d 100644 --- a/i18npool/CustomTarget_breakiterator.mk +++ b/i18npool/CustomTarget_breakiterator.mk @@ -9,7 +9,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,i18npool/breakiterator)) -i18npool_BIDIR := $(call gb_CustomTarget_get_workdir,i18npool/breakiterator) +i18npool_BIDIR := $(gb_CustomTarget_workdir)/i18npool/breakiterator $(call gb_CustomTarget_get_target,i18npool/breakiterator) : \ $(i18npool_BIDIR)/OpenOffice_dat.c diff --git a/i18npool/CustomTarget_collator.mk b/i18npool/CustomTarget_collator.mk index 6f8f91f1f6f0..0364d9291498 100644 --- a/i18npool/CustomTarget_collator.mk +++ b/i18npool/CustomTarget_collator.mk @@ -9,7 +9,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator)) -i18npool_CODIR := $(call gb_CustomTarget_get_workdir,i18npool/collator) +i18npool_CODIR := $(gb_CustomTarget_workdir)/i18npool/collator i18npool_COTXTS := \ cu_charset.txt \ $(call gb_Helper_optional_locale,ca, \ diff --git a/i18npool/CustomTarget_indexentry.mk b/i18npool/CustomTarget_indexentry.mk index 3a784a6f5e6d..e6c0785c44fd 100644 --- a/i18npool/CustomTarget_indexentry.mk +++ b/i18npool/CustomTarget_indexentry.mk @@ -22,12 +22,12 @@ i18npool_IDXTXTS := \ zh_zhuyin.txt $(call gb_CustomTarget_get_target,i18npool/indexentry) : $(SRCDIR)/i18npool/CustomTarget_indexentry.mk \ - $(patsubst %.txt,$(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx,$(i18npool_IDXTXTS)) + $(patsubst %.txt,$(gb_CustomTarget_workdir)/i18npool/indexentry/%.cxx,$(i18npool_IDXTXTS)) -$(call gb_CustomTarget_get_workdir,i18npool/indexentry)/%.cxx : \ +$(gb_CustomTarget_workdir)/i18npool/indexentry/%.cxx : \ $(SRCDIR)/i18npool/source/indexentry/data/%.txt \ $(call gb_Executable_get_runtime_dependencies,genindex_data) \ - | $(call gb_CustomTarget_get_workdir,i18npool/indexentry)/.dir + | $(gb_CustomTarget_workdir)/i18npool/indexentry/.dir $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),IND,1) $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),IND) $(call gb_Helper_abbreviate_dirs, \ diff --git a/i18npool/CustomTarget_localedata.mk b/i18npool/CustomTarget_localedata.mk index 47eed3a6c197..5a6b677c8099 100644 --- a/i18npool/CustomTarget_localedata.mk +++ b/i18npool/CustomTarget_localedata.mk @@ -15,7 +15,7 @@ $(eval $(call gb_CustomTarget_register_targets,i18npool/localedata,\ $(foreach name,$(i18npool_LD_NAMES),localedata_$(name).cxx) \ )) -$(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx : \ +$(gb_CustomTarget_workdir)/i18npool/localedata/localedata_%_new.cxx : \ $(SRCDIR)/i18npool/source/localedata/data/%.xml \ $(call gb_Executable_get_runtime_dependencies,saxparser) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SAX,1) @@ -27,9 +27,9 @@ $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx : \ -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,saxparser)))) $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),SAX) -.PRECIOUS: $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx -$(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%.cxx : \ - $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_%_new.cxx +.PRECIOUS: $(gb_CustomTarget_workdir)/i18npool/localedata/localedata_%_new.cxx +$(gb_CustomTarget_workdir)/i18npool/localedata/localedata_%.cxx : \ + $(gb_CustomTarget_workdir)/i18npool/localedata/localedata_%_new.cxx $(call gb_Helper_copy_if_different_and_touch,$<,$@) # vim: set noet sw=4 ts=4: diff --git a/i18npool/CustomTarget_textconversion.mk b/i18npool/CustomTarget_textconversion.mk index d6669b06ce25..7bd13171035f 100644 --- a/i18npool/CustomTarget_textconversion.mk +++ b/i18npool/CustomTarget_textconversion.mk @@ -10,13 +10,13 @@ $(eval $(call gb_CustomTarget_CustomTarget,i18npool/textconversion)) $(call gb_CustomTarget_get_target,i18npool/textconversion) : \ - $(patsubst %.dic,$(call gb_CustomTarget_get_workdir,i18npool/textconversion)/%.cxx,$(notdir \ + $(patsubst %.dic,$(gb_CustomTarget_workdir)/i18npool/textconversion/%.cxx,$(notdir \ $(wildcard $(SRCDIR)/i18npool/source/textconversion/data/*.dic))) -$(call gb_CustomTarget_get_workdir,i18npool/textconversion)/%.cxx : \ +$(gb_CustomTarget_workdir)/i18npool/textconversion/%.cxx : \ $(SRCDIR)/i18npool/source/textconversion/data/%.dic \ $(call gb_Executable_get_runtime_dependencies,genconv_dict) \ - | $(call gb_CustomTarget_get_workdir,i18npool/textconversion)/.dir + | $(gb_CustomTarget_workdir)/i18npool/textconversion/.dir $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CDC,1) $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),CDC) $(call gb_Helper_abbreviate_dirs, \ diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk index 4d5c7a534ff0..0b72164bbf96 100644 --- a/i18npool/Library_i18npool.mk +++ b/i18npool/Library_i18npool.mk @@ -127,7 +127,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,i18npool,\ )) ifeq ($(DISABLE_DYNLOADING),TRUE) -$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata): $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx +$(call gb_CxxObject_get_target,i18npool/source/localedata/localedata): $(gb_CustomTarget_workdir)/i18npool/localedata/localedata_static.hxx ifeq ($(WITH_LOCALES),) i18npool_locale_pattern=% @@ -135,19 +135,19 @@ else i18npool_locale_pattern=$(WITH_LOCALES) $(addsuffix _%,$(WITH_LOCALES)) endif -$(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_static.hxx : $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl - mkdir -p $(call gb_CustomTarget_get_workdir,i18npool/localedata) && $(PERL) $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl $(filter $(i18npool_locale_pattern),$(patsubst $(SRCDIR)/i18npool/source/localedata/data/%.xml,%,$(shell echo $(SRCDIR)/i18npool/source/localedata/data/*.xml))) >$@ +$(gb_CustomTarget_workdir)/i18npool/localedata/localedata_static.hxx : $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl + mkdir -p $(gb_CustomTarget_workdir)/i18npool/localedata && $(PERL) $(SRCDIR)/i18npool/source/localedata/genstaticheader.pl $(filter $(i18npool_locale_pattern),$(patsubst $(SRCDIR)/i18npool/source/localedata/data/%.xml,%,$(shell echo $(SRCDIR)/i18npool/source/localedata/data/*.xml))) >$@ $(call gb_CxxObject_get_target,i18npool/source/localedata/localedata) : \ - INCLUDE += -I$(call gb_CustomTarget_get_workdir,i18npool/localedata) + INCLUDE += -I$(gb_CustomTarget_workdir)/i18npool/localedata endif # DISABLE_DYNLOADING # collator_unicode.cxx includes generated lrl_include.hxx $(call gb_CxxObject_get_target,i18npool/source/collator/collator_unicode) : \ - INCLUDE += -I$(call gb_CustomTarget_get_workdir,i18npool/collator) + INCLUDE += -I$(gb_CustomTarget_workdir)/i18npool/collator $(call gb_CxxObject_get_target,i18npool/source/collator/collator_unicode) :| \ - $(call gb_CustomTarget_get_workdir,i18npool/collator)/lrl_include.hxx + $(gb_CustomTarget_workdir)/i18npool/collator/lrl_include.hxx $(eval $(call gb_Library_add_generated_cobjects,i18npool,\ CustomTarget/i18npool/breakiterator/OpenOffice_dat \ |