genode/tool/ports/mk/metadata_single_port.mk
Christian Helmuth 22bee79534 port/metadata: improve info for multi-source ports
Now, ./tool/ports/metadata dde_linux produces the following output.

  PORT:     dde_linux
  LICENSE:  GPLv2
  VERSION:  individual (see sources)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.3.tar.xz VERSION 4.4.3 (lxip)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz VERSION 4.16.3 (fec)
  SOURCE:   https://github.com/cproc/dwc_otg.git git r5 (dwc_otg_host)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz VERSION 4.16.3 (usb_host)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz VERSION 4.16.3 (usb_hid)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz VERSION 4.16.3 (usb_modem)
  SOURCE:   https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.3.tar.xz VERSION 4.16.3 (usb_net)

Issue #4685
2023-05-30 12:03:34 +02:00

55 lines
1.1 KiB
Makefile

#
# \brief Retrieve version information of port source
# \author Christian Helmuth
# \date 2023-01-20
#
PORTS_TOOL_DIR ?= $(GENODE_DIR)/tool/ports
include $(GENODE_DIR)/tool/ports/mk/front_end.inc
include $(GENODE_DIR)/tool/ports/mk/check_port_arg.inc
#
# Include definitions provided by the port description file
#
include $(PORT)
.NOTPARALLEL:
#
# Assertion for the presence of a LICENSE and VERSION declarations in the port
# description
#
ifeq ($(LICENSE),)
$(TARGET): license_undefined
license_undefined:
@$(ECHO) "Error: License undefined"; false
endif
ifeq ($(VERSION),)
$(TARGET): version_undefined
version_undefined:
@$(ECHO) "Error: Version undefined"; false
endif
info:
@$(ECHO) "PORT: $(PORT_NAME)"
@$(ECHO) "LICENSE: $(LICENSE)"
@$(ECHO) "VERSION: $(VERSION)"
%.file:
@$(ECHO) "SOURCE: $(URL($*))$(if $(VERSION($*)), VERSION $(VERSION($*)),) ($*)"
%.archive:
@$(ECHO) "SOURCE: $(URL($*))$(if $(VERSION($*)), VERSION $(VERSION($*)),) ($*)"
%.git:
@$(ECHO) "SOURCE: $(URL($*)) git $(REV($*)) ($*)"
%.svn:
@$(ECHO) "SOURCE: $(URL($*)) svn $(REV($*)) ($*)"
$(DOWNLOADS): info
$(TARGET): $(DOWNLOADS)