package-dumpinfo.mk 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
  28. Conflicts: $(CONFLICTS)
  29. Menu-Depends: $(MDEPENDS)
  30. Provides: $(PROVIDES)
  31. $(if $(VARIANT),Build-Variant: $(VARIANT)
  32. $(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT)
  33. ))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
  34. )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
  35. )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
  36. )Section: $(SECTION)
  37. Category: $(CATEGORY)
  38. $(if $(filter nonshared,$(PKGFLAGS)),,Repository: $(if $(FEED),$(FEED),base)
  39. )Title: $(TITLE)
  40. Maintainer: $(MAINTAINER)
  41. $(if $(USERID),Require-User: $(USERID)
  42. )Source: $(PKG_SOURCE)
  43. $(if $(PKG_LICENSE),License: $(PKG_LICENSE)
  44. )$(if $(PKG_LICENSE_FILES),LicenseFiles: $(PKG_LICENSE_FILES)
  45. )Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
  46. $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
  47. )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
  48. )$(if $(HIDDEN),Hidden: $(HIDDEN)
  49. )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
  50. $(if $(URL),$(URL)
  51. )$(MAINTAINER)
  52. @@
  53. $(if $(Package/$(1)/config),Config:
  54. $(Package/$(1)/config)
  55. @@
  56. )$(foreach pc,$(preconfig_$(1)),
  57. $(Preconfig/$(pc))))
  58. endef
  59. define Feature/Default
  60. TARGET_NAME:=
  61. TARGET_TITLE:=
  62. PRIORITY:=
  63. NAME:=
  64. endef
  65. define Feature
  66. $(eval $(Feature/Default))
  67. $(eval $(Feature/$(1)))
  68. $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
  69. endef
  70. define Dumpinfo/Feature
  71. $(info Feature: $(TARGET_NAME)_$(1)
  72. Target-Name: $(TARGET_NAME)
  73. Target-Title: $(TARGET_TITLE)
  74. Feature-Name: $(NAME)
  75. $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
  76. )Feature-Description:
  77. $(Feature/$(1)/description)
  78. @@
  79. )
  80. endef
  81. endif