From c06eeb0e3c9c1a9fa8f913e2d785b03220bfdabd Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Tue, 18 Apr 2017 15:26:39 +0200 Subject: Fix "make dist" to include version number, docouple it from rpm packaging Change-Id: If2f9976d668089026c97b897cf449bff09050631 Signed-off-by: Damjan Marion --- Makefile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 133c3d45cb5..791127a7b00 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) -- cgit 1.2.3-korg