aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-12-21 16:39:56 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-22 16:42:20 +0100
commitffb0181a8731847ea0d02d6e158adf3d7d95c382 (patch)
treecb7194bddf4b8983598829102a4e239f28e1bc7f /rules.mk
parent24e58c3f72a94ebf659586eb876b06b59adb2bb2 (diff)
downloadupstream-ffb0181a8731847ea0d02d6e158adf3d7d95c382.tar.gz
upstream-ffb0181a8731847ea0d02d6e158adf3d7d95c382.tar.bz2
upstream-ffb0181a8731847ea0d02d6e158adf3d7d95c382.zip
build: add defaults for PKG_SOURCE, PKG_SOURCE_SUBDIR, PKG_VERSION
This makes it easier to unify versioning of git based package downloads. PKG_SOURCE_DATE along with an 8-character abbreviation of the git hash is used as PKG_VERSION, PKG_RELEASE should be used like normal packages. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 41e0ef2343..b1d9926270 100644
--- a/rules.mk
+++ b/rules.mk
@@ -55,6 +55,8 @@ __tr_template = $(__tr_head)$$(1)$(__tr_tail)
$(eval toupper = $(call __tr_template,$(chars_lower),$(chars_upper)))
$(eval tolower = $(call __tr_template,$(chars_upper),$(chars_lower)))
+version_abbrev = $(if $(if $(CHECK),,$(DUMP)),$(1),$(shell printf '%.8s' $(1)))
+
_SINGLE=export MAKEFLAGS=$(space);
CFLAGS:=
ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))