package-dumpinfo.mk 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. ifneq ($(DUMP),)
  8. dumpinfo: FORCE
  9. define Config/template
  10. Preconfig: $(1)
  11. Preconfig-Type: $(2)
  12. Preconfig-Default: $(3)
  13. Preconfig-Label: $(4)
  14. endef
  15. define Config
  16. Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
  17. preconfig_$$(1) += $(1)
  18. endef
  19. define Dumpinfo/Package
  20. $(info Package: $(1)
  21. $(if $(MENU),Menu: $(MENU)
  22. )$(if $(SUBMENU),Submenu: $(SUBMENU)
  23. )$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP)
  24. )$(if $(DEFAULT),Default: $(DEFAULT)
  25. )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
  26. )Version: $(VERSION)
  27. Depends: $(DEPENDS)
  28. Provides: $(PROVIDES)
  29. $(if $(VARIANT),Build-Variant: $(VARIANT)
  30. )$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
  31. )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
  32. )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
  33. )Section: $(SECTION)
  34. Category: $(CATEGORY)
  35. Title: $(TITLE)
  36. Maintainer: $(MAINTAINER)
  37. Source: $(PKG_SOURCE)
  38. Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
  39. $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
  40. )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
  41. )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
  42. $(if $(URL),$(URL)
  43. )@@
  44. $(if $(Package/$(1)/config),Config:
  45. $(Package/$(1)/config)
  46. @@
  47. )$(foreach pc,$(preconfig_$(1)),
  48. $(Preconfig/$(pc))))
  49. endef
  50. define Feature/Default
  51. TARGET_NAME:=
  52. TARGET_TITLE:=
  53. PRIORITY:=
  54. NAME:=
  55. endef
  56. define Feature
  57. $(eval $(Feature/Default))
  58. $(eval $(Feature/$(1)))
  59. $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
  60. endef
  61. define Dumpinfo/Feature
  62. $(info Feature: $(TARGET_NAME)_$(1)
  63. Target-Name: $(TARGET_NAME)
  64. Target-Title: $(TARGET_TITLE)
  65. Feature-Name: $(NAME)
  66. $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
  67. )Feature-Description:
  68. $(Feature/$(1)/description)
  69. @@
  70. )
  71. endef
  72. endif