2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
12 define Config/template
15 Preconfig-Default: $(3)
21 Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
22 preconfig_$$(1) += $(1)
25 define Dumpinfo/Package
27 $(if $(MENU),Menu: $(MENU)
28 )$(if $(SUBMENU),Submenu: $(SUBMENU)
29 )$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP)
30 )$(if $(DEFAULT),Default: $(DEFAULT)
31 )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
33 Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
34 Conflicts: $(CONFLICTS)
35 Menu-Depends: $(MDEPENDS)
37 $(if $(VARIANT),Build-Variant: $(VARIANT)
38 $(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT)
39 ))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
40 )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
41 )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
45 Maintainer: $(MAINTAINER)
46 $(if $(USERID),Require-User: $(USERID)
47 )Source: $(PKG_SOURCE)
48 Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
49 $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
50 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
51 )$(if $(HIDDEN),Hidden: $(HIDDEN)
52 )$(if $(FEED),Feed: $(FEED)
53 )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
57 $(if $(Package/$(1)/config),Config:
58 $(Package/$(1)/config)
60 )$(foreach pc,$(preconfig_$(1)),
64 define Feature/Default
72 $(eval $(Feature/Default))
73 $(eval $(Feature/$(1)))
74 $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
77 define Dumpinfo/Feature
78 $(info Feature: $(TARGET_NAME)_$(1)
79 Target-Name: $(TARGET_NAME)
80 Target-Title: $(TARGET_TITLE)
82 $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
84 $(Feature/$(1)/description)