summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-03-07 15:03:07 +0100
committerDavid Tardon <dtardon@redhat.com>2016-03-07 17:43:29 +0100
commit64b99327d301dc193edcb64d26bd823703acdb34 (patch)
tree0cf6a44b5884ebb82a75cc81afacc567460645ac /solenv
parent3c84fd27e898fbf872e415620e1f90f755c5f561 (diff)
drop handling of templates in SrsTarget
Change-Id: I5445837ec4f647e91fe2aeab1251e48628f5e7f1
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/AllLangResTarget.mk142
-rw-r--r--solenv/gbuild/TargetLocations.mk4
-rw-r--r--solenv/gbuild/extensions/post_Counters.mk2
3 files changed, 0 insertions, 148 deletions
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index ef10ec530c0e..433a5cd4f85f 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -22,11 +22,8 @@
#
# target task depends on
# SrsTarget joining the parts SrsPartTarget
-# SrsTemplateTarget
# SrsPartTarget preprocessing SrsPartMergeTarget (with l10n)
# source file (without l10n)
-# SrsTemplateTarget handling templates SrsTemplatePartTarget
-# SrsTemplatePartTarget handling template SrsPartMergeTarget
# SrsPartMergeTarget merging/transex source file (only needed with l10n)
# Overview of dependencies and tasks of AllLangResTarget
@@ -119,97 +116,6 @@ endif
endef
-# SrsTemplatePartTarget class
-
-define gb_SrsTemplatePartTarget_SrsTemplatePartTarget
-$(call gb_SrsTemplatePartTarget_get_target,$(1)) : $(call gb_SrsPartMergeTarget_get_target,$(1))
- $$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $$(dir $$@) && \
- cp $$< $$@)
-ifneq ($(strip $(gb_WITH_LANG)),)
-$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1),$(2))
-endif
-
-endef
-
-# SrsTemplateTarget class
-#
-# This class handles src templates.
-#
-# Templates are src files that contain only macros that are then used
-# from other src files, but these macros contain translatable strings.
-# Because the processing of src files is done in two phases: 1/
-# localization and 2/ merging, templates must be translated
-# independently from the src files that include them. Special care must
-# be taken to ensure that the right file (i.e., the localized one) is
-# included; in order to do that, the templates in the source tree are
-# called foo_tmpl.src, but the localization phase produces foo.src, and
-# these names (i.e., without the _tmpl suffix) must be placed in
-# #include statements in other src files.
-
-define gb_SrsTemplateTarget__command
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- touch $(1))
-endef
-
-# This machinery ensures that templates are regenerated when switching
-# from localized to unlocalized configuration and back.
-#
-# How it works:
-# We let _get_target depend on _get_update_target, so after they are
-# done, _get_target is newer than _get_update_target. If
-# gb_WITH_LANG changes (from nonempty to empty or the other way around),
-# _get_target and _get_update_target are switched, therefore _get_target
-# is now _older_ than _get_update_target and must be regenerated :-)
-gb_SrsTemplateTarget__get_merged_target = $(call gb_SrsTemplateTarget_get_target,$(1))_merged_last
-gb_SrsTemplateTarget__get_unmerged_target = $(call gb_SrsTemplateTarget_get_target,$(1))_unmerged_last
-
-ifeq ($(strip $(gb_WITH_LANG)),)
-gb_SrsTemplateTarget__get_target = $(call gb_SrsTemplateTarget__get_unmerged_target,$(1))
-gb_SrsTemplateTarget__get_update_target = $(call gb_SrsTemplateTarget__get_merged_target,$(1))
-else
-gb_SrsTemplateTarget__get_target = $(call gb_SrsTemplateTarget__get_merged_target,$(1))
-gb_SrsTemplateTarget__get_update_target = $(call gb_SrsTemplateTarget__get_unmerged_target,$(1))
-endif
-
-define gb_SrsTemplateTarget_SrsTemplateTarget
-$(call gb_SrsTemplateTarget_get_target,$(1)) : PARTS :=
-$(call gb_SrsTemplateTarget_get_clean_target,$(1)) : PARTS :=
-$(call gb_SrsTemplateTarget_get_target,$(1)) : $(call gb_SrsTemplateTarget__get_target,$(1))
-$(call gb_SrsTemplateTarget__get_target,$(1)) : $(call gb_SrsTemplateTarget__get_update_target,$(1))
-
-endef
-
-.PHONY : $(call gb_SrsTemplateTarget_get_target,%_last)
-$(call gb_SrsTemplateTarget_get_target,%_last) :
- $(call gb_SrsTemplateTarget__command,$@)
-
-.PHONY : $(call gb_SrsTemplateTarget_get_target,%)
-$(call gb_SrsTemplateTarget_get_target,%) :
- $(if $(strip $(PARTS)),$(call gb_Output_announce,$*,$(true),SRT,4))
- $(call gb_SrsTemplateTarget__command,$@)
-
-.PHONY : $(call gb_SrsTemplateTarget_get_clean_target,%)
-$(call gb_SrsTemplateTarget_get_clean_target,%) :
- $(if $(strip $(PARTS)),$(call gb_Output_announce,$*,$(false),SRT,4))
- -$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_SrsTemplateTarget_get_target,$*) \
- $(call gb_SrsTemplateTarget__get_merged_target,$*) \
- $(call gb_SrsTemplateTarget__get_unmerged_target,$*) \
- $(foreach part,$(PARTS),$(call gb_SrsTemplatePartTarget_get_target,$(part))) \
- $(foreach part,$(PARTS),$(call gb_SrsPartMergeTarget_get_target,$(part))))
-
-define gb_SrsTemplateTarget_add_file
-$(call gb_SrsTemplatePartTarget_SrsTemplatePartTarget,$(2),$(3))
-$(call gb_SrsTemplateTarget_get_target,$(1)) : PARTS += $(2)
-$(call gb_SrsTemplateTarget_get_clean_target,$(1)) : PARTS += $(2)
-$(call gb_SrsTemplateTarget__get_target,$(1)) : $(call gb_SrsTemplatePartTarget_get_target,$(2))
-$(call gb_SrsTemplatePartTarget_get_target,$(2)) : $(call gb_SrsTemplateTarget__get_update_target,$(1))
-$(call gb_SrsPartMergeTarget_get_target,$(2)) : $(call gb_SrsTemplateTarget__get_update_target,$(1))
-
-endef
-
# SrsTarget class
gb_SrsTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
@@ -258,13 +164,10 @@ $(call gb_SrsTarget_get_dep_target,%) : \
endif
define gb_SrsTarget_SrsTarget
-$(call gb_SrsTemplateTarget_SrsTemplateTarget,$(1))
$(call gb_SrsTarget_get_target,$(1)) : DEFS := $(gb_SrsTarget_DEFAULTDEFS)
$(call gb_SrsTarget_get_target,$(1)) : INCLUDE := $(SOLARINC)
$(call gb_SrsTarget_get_clean_target,$(1)) : PARTS :=
$(call gb_SrsTarget_get_target,$(1)) : PARTS :=
-$(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsTemplateTarget_get_target,$(1))
-$(call gb_SrsTarget_get_clean_target,$(1)) : $(call gb_SrsTemplateTarget_get_clean_target,$(1))
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_SrsTarget_get_dep_target,$(1)) : PARTS :=
-include $(call gb_SrsTarget_get_dep_target,$(1))
@@ -295,7 +198,6 @@ endif
$(call gb_SrsPartTarget_SrsPartTarget,$(2),$(3))
$(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsPartTarget_get_target,$(2))
$(call gb_SrsPartTarget_get_target,$(2)) :| $(call gb_SrsTarget_get_headers_target,$(1))
-$(call gb_SrsPartTarget_get_target,$(2)) :| $(call gb_SrsTemplateTarget_get_target,$(1))
$(call gb_SrsTarget_get_clean_target,$(1)) : PARTS += $(2)
$(call gb_SrsTarget_get_target,$(1)) : PARTS += $(2)
ifeq ($(gb_FULLDEPS),$(true))
@@ -331,50 +233,6 @@ $(foreach file,$(2),$(call gb_SrsTarget_add_nonlocalizable_file,$(1),$(file)))
endef
-define gb_SrsTarget_add_template
-$(call gb_SrsTemplateTarget_add_file,$(1),$(2),$(true))
-
-endef
-
-define gb_SrsTarget_add_templates
-$(foreach template,$(2),$(call gb_SrsTarget_add_template,$(1),$(template)))
-
-endef
-
-# Add a srs template that does not have any localizable content.
-# These files will be copied instead of parsing them with transex3.
-#
-# gb_SrsTarget_add_nonlocalizable_template srs template
-define gb_SrsTarget_add_nonlocalizable_template
-$(call gb_SrsTemplateTarget_add_file,$(1),$(2),$(false))
-
-endef
-
-# Add srs templates that do not have any localizable content.
-#
-# gb_SrsTarget_add_nonlocalizable_templates srs template(s)
-define gb_SrsTarget_add_nonlocalizable_templates
-$(foreach template,$(2),$(call gb_SrsTarget_add_nonlocalizable_template,$(1),$(template)))
-
-endef
-
-
-# Use templates built by another SrsTarget.
-#
-# gb_SrsTarget_use_srstarget srs other-srs
-define gb_SrsTarget_use_srstarget
-$(call gb_SrsTarget_get_headers_target,$(1)) : $(call gb_SrsTemplateTarget_get_target,$(2))
-
-endef
-
-# Use templates built by other SrsTargets.
-#
-# gb_SrsTarget_use_srstargets srs other-srs(s)
-define gb_SrsTarget_use_srstargets
-$(foreach srstarget,$(2),$(call gb_SrsTarget_use_srstarget,$(1),$(srstarget)))
-
-endef
-
# ResTarget
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index adfd3a7feb4f..9c15d8e92e8d 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -153,9 +153,6 @@ gb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1)
gb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1)
gb_SrsTarget_get_headers_target = $(WORKDIR)/SrsTarget/$(1).headers
gb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs
-gb_SrsTemplatePartTarget_get_target = $(WORKDIR)/SrsTemplatePartTarget/$(firstword $(subst /, ,$(1)))/$(subst _tmpl,,$(notdir $(1)))
-gb_SrsTemplateTarget_get_include_dir = $(WORKDIR)/SrsTemplatePartTarget/$(firstword $(subst /, ,$(1)))
-gb_SrsTemplateTarget_get_target = $(WORKDIR)/SrsTemplateTarget/$(1)
gb_ThesaurusIndexTarget_get_target = $(WORKDIR)/ThesaurusIndexTarget/$(basename $(1)).idx
gb_UIConfig_get_imagelist_target = $(WORKDIR)/UIConfig/$(1).ilst
gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1).done
@@ -277,7 +274,6 @@ $(eval $(call gb_Helper_make_clean_targets,\
ScpTemplateTarget \
SdiTarget \
SrsTarget \
- SrsTemplateTarget \
StaticLibrary \
ThesaurusIndexTarget \
CppunitTest \
diff --git a/solenv/gbuild/extensions/post_Counters.mk b/solenv/gbuild/extensions/post_Counters.mk
index 64f8173ca51c..afd2875d4f85 100644
--- a/solenv/gbuild/extensions/post_Counters.mk
+++ b/solenv/gbuild/extensions/post_Counters.mk
@@ -8,8 +8,6 @@
ifneq ($(filter countoutdated,$(MAKECMDGOALS)),)
-gb_SrsTarget_add_template=
-gb_SrsTarget_add_templates=
gb_Output_announce=
ifneq ($(strip $(filter-out countoutdated,$(MAKECMDGOALS))),)