package-dumpinfo.mk 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
  30. )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
  31. )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
  32. )Section: $(SECTION)
  33. Category: $(CATEGORY)
  34. Title: $(TITLE)
  35. Maintainer: $(MAINTAINER)
  36. Source: $(PKG_SOURCE)
  37. Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
  38. $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
  39. )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
  40. )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
  41. $(if $(URL),$(URL)
  42. )@@
  43. $(if $(Package/$(1)/config),Config:
  44. $(Package/$(1)/config)
  45. @@
  46. )$(foreach pc,$(preconfig_$(1)),
  47. $(Preconfig/$(pc))))
  48. endef
  49. define Feature/Default
  50. TARGET_NAME:=
  51. TARGET_TITLE:=
  52. PRIORITY:=
  53. NAME:=
  54. endef
  55. define Feature
  56. $(eval $(Feature/Default))
  57. $(eval $(Feature/$(1)))
  58. $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
  59. endef
  60. define Dumpinfo/Feature
  61. $(info Feature: $(TARGET_NAME)_$(1)
  62. Target-Name: $(TARGET_NAME)
  63. Target-Title: $(TARGET_TITLE)
  64. Feature-Name: $(NAME)
  65. $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
  66. )Feature-Description:
  67. $(Feature/$(1)/description)
  68. @@
  69. )
  70. endef
  71. endif