rewritten template parser for awx - uses @for, @if, @else, @end for basic flow control
[librecmc/librecmc.git] / include / package-dumpinfo.mk
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
8 ifneq ($(DUMP),)
9   define Config
10     preconfig_$$(1) += echo "Preconfig: $(1)"; echo "Preconfig-Type: $(2)"; echo "Preconfig-Default: $(3)"; echo "Preconfig-Label: $(4)";
11   endef
12
13   define Dumpinfo
14     dumpinfo: dumpinfo-$(1)
15     .SILENT: dumpinfo-$(1)
16     dumpinfo-$(1): FORCE
17           @echo "Package: $(1)" ; \
18                 $(if $(MENU),echo "Menu: $(MENU)";) \
19                 $(if $(SUBMENU),echo "Submenu: $(SUBMENU)";) \
20                 $(if $(SUBMENUDEP),echo "Submenu-Depends: $(SUBMENUDEP)";) \
21                 $(if $(DEFAULT),echo "Default: $(DEFAULT)";)  \
22                 if [ "$$$$PREREQ_CHECK" = 1 ]; then echo "Prereq-Check: 1"; fi; \
23                 echo "Version: $(VERSION)"; \
24                 echo "Depends: $(DEPENDS)"; \
25                 echo "Provides: $(PROVIDES)"; \
26                 echo "Build-Depends: $(PKG_BUILD_DEPENDS)"; \
27                 echo "Section: $(SECTION)"; \
28                 echo "Category: $(CATEGORY)"; \
29                 echo "Title: $(TITLE)"; \
30                 echo "Maintainer: $(MAINTAINER)"; \
31                 echo -n "Description: "; \
32                 getvar $(call shvar,Package/$(1)/description); \
33                 $(if $(URL),echo;echo "$(URL)";) \
34                 echo "@@" ; \
35                 $$(if $$(Package/$(1)/config),echo "Config: "; getvar $(call shvar,Package/$(1)/config); echo "@@"; ) \
36                 $$(if $$(preconfig_$(1)),$$(preconfig_$(1)) echo "")
37   endef
38 endif