Browse Source

pkg-perl: add per package upgrade target

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>
Francois Perrad 7 years ago
parent
commit
e04289beaa
1 changed files with 8 additions and 0 deletions
  1. 8 0
      package/pkg-perl.mk

+ 8 - 0
package/pkg-perl.mk

@@ -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
 
 ################################################################################