Changeset 1417 in kBuild
- Timestamp:
- Mar 18, 2008 10:48:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r1416 r1417 624 624 _TEMPLATES := $(sort $(_TEMPLATES)) 625 625 626 define def_templates_include 627 ifndef TEMPLATE_$(template) 628 TEMPLATE_$(template)_INCLUDE_FILE_ := $(firstword $(foreach path, $(KBUILD_TEMPLATE_PATHS) $(PATH_KBUILD)/templates $(KBUILD_DEFAULT_PATHS), $(wildcard $(path)/$(template).kmk))) 629 ifneq ($(TEMPLATE_$(template)_INCLUDE_FILE_),) 630 include $(TEMPLATE_$(template)_INCLUDE_FILE_) 631 else 632 $$(error kBuild: Cannot find template '$(template)') 626 ## Template load function. 627 # @param loading The template name. This is prefixed. 628 define def_templates_load_function 629 loading := $(patsubst TEMPLATE_%,%,$(loading)) 630 ifndef TEMPLATE_$(loading) 631 TEMPLATE_$(loading)_KMK_FILE := $(firstword $(foreach path, $(KBUILD_TEMPLATE_PATHS) $(PATH_KBUILD)/templates $(KBUILD_DEFAULT_PATHS), $(wildcard $(path)/$(loading).kmk))) 632 ifneq ($(TEMPLATE_$(loading)_KMK_FILE),) 633 $(error kBuild: Cannot find include file for the template '$(loading)'! Searched: $(KBUILD_TEMPLATE_PATHS) $(PATH_KBUILD)/templates $(KBUILD_DEFAULT_PATHS)) 633 634 endif 635 include $(TEMPLATE_$(loading)_KMK_FILE) 636 ifndef TEMPLATE_$(loading) 637 $(warning kBuild: TEMPLATE_$(loading) was not defined by $(TEMPLATE_$(loading)_KMK_FILE)!) 638 endif 634 639 endif 635 640 endef # def_templates_include 636 $(foreach template, $(_TEMPLATES), $(eval $(def_templates_include))) 637 638 #$ (warning dbg _TEMPLATES := $(_TEMPLATES)) 641 $(foreach loading, $(addprefix TEMPLATE_,$(_TEMPLATES)), $(eval $(value def_templates_include))) 639 642 640 643 … … 866 869 867 870 src_prefix := TEMPLATE_ 868 load_function := 871 load_function := def_templates_load_function 869 872 properties := 870 873 properties_now_l :=
Note:
See TracChangeset
for help on using the changeset viewer.