aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-18 15:26:39 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-04-19 20:16:14 +0000
commitc06eeb0e3c9c1a9fa8f913e2d785b03220bfdabd (patch)
tree7ce8ea3eb0aa68f102922868c08470ecb2515c97 /Makefile
parentb59a7055524bae29a328958c493d0b600776dc27 (diff)
Fix "make dist" to include version number, docouple it from rpm packaging
Change-Id: If2f9976d668089026c97b897cf449bff09050631 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 20 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 133c3d45..791127a7 100644
--- a/Makefile
+++ b/Makefile
@@ -214,18 +214,30 @@ else
$(shell $(BR)/scripts/version > $(BR)/scripts/.version)
endif
-dist: $(BR)/scripts/.version
- $(MAKE) verstring=$(PLATFORM)-$(shell cat $(BR)/scripts/.version) prefix=$(PLATFORM) distversion
-
-distversion: $(BR)/scripts/.version
- $(BR)/scripts/verdist ${BR} ${prefix}-$(shell $(BR)/scripts/version rpm-version) ${verstring}
- mv $(verstring).tar.gz $(BR)/rpm
+DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
+DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
+
+dist:
+ @git archive \
+ --prefix=$(DIST_SUBDIR)/ \
+ --format=tar \
+ -o $(DIST_FILE) \
+ HEAD
+ @git describe > $(BR)/.version
+ @tar --append \
+ --file $(DIST_FILE) \
+ --transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
+ $(BR)/.version
+ @$(RM) $(BR)/.version $(DIST_FILE).xz
+ @xz -v --threads=0 $(DIST_FILE)
+ @$(RM) $(BR)/vpp-latest.tar.xz
+ @ln -rs $(DIST_FILE).xz $(BR)/vpp-latest.tar.xz
build: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,vpp-install)
wipedist:
- $(RM) $(BR)/scripts/.version $(BR)/rpm/*.tar.gz
+ @$(RM) $(BR)/*.tar.xz
wipe: wipedist $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,vpp-wipe)
@@ -351,7 +363,7 @@ pkg-deb:
$(call make,$(PLATFORM),install-deb)
pkg-rpm: dist
- $(call make,$(PLATFORM),install-rpm)
+ make -C extras/rpm
dpdk-install-dev:
make -C dpdk install-$(PKG)