pkg-perl: add per package upgrade target
authorFrancois Perrad <fperrad@gmail.com>
Thu, 11 Oct 2018 16:12:48 +0000 (18:12 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 23 Oct 2018 23:45:41 +0000 (00:45 +0100)
If PKG_DISTNAME is defined, an addition pkg-upgrade target is created
that will run scancpan with the right parameters for re-generating the
package.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[Arnout:
  - make it really private to pkg-perl;
  - factor away the host/target condition, instead use $(4) directly.
]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/pkg-perl.mk

index 07348bd5d320906e6651df64a001ce489d0ceefc..1ecf31eff9ca6d5a6da4559e5c4b336413adb769 100644 (file)
@@ -197,6 +197,14 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
+# Upgrade helper
+ifneq ($$($(3)_DISTNAME),)
+$(1)-upgrade:
+       utils/scancpan -force -$(4) $$($(3)_DISTNAME)
+
+.PHONY: $(1)-upgrade
+endif
+
 endef
 
 ################################################################################