2
0

package-dumpinfo.mk 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. )$(MAINTAINER)
  44. @@
  45. $(if $(Package/$(1)/config),Config:
  46. $(Package/$(1)/config)
  47. @@
  48. )$(foreach pc,$(preconfig_$(1)),
  49. $(Preconfig/$(pc))))
  50. endef
  51. define Feature/Default
  52. TARGET_NAME:=
  53. TARGET_TITLE:=
  54. PRIORITY:=
  55. NAME:=
  56. endef
  57. define Feature
  58. $(eval $(Feature/Default))
  59. $(eval $(Feature/$(1)))
  60. $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
  61. endef
  62. define Dumpinfo/Feature
  63. $(info Feature: $(TARGET_NAME)_$(1)
  64. Target-Name: $(TARGET_NAME)
  65. Target-Title: $(TARGET_TITLE)
  66. Feature-Name: $(NAME)
  67. $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
  68. )Feature-Description:
  69. $(Feature/$(1)/description)
  70. @@
  71. )
  72. endef
  73. endif