Enable build from dist tarball independent of git.
This is necessary for downstream builds from source rpm. JIRA: VPP-498 Change-Id: I30ea51a19b153dc35ececbbca79b940fe4e3bc8a Signed-off-by: Thomas F Herbert <therbert@redhat.com>
This commit is contained in:
Thomas F Herbert
committed by
Damjan Marion
parent
93d84c9fc2
commit
8d48722b09
17
Makefile
17
Makefile
@ -274,12 +274,17 @@ DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
|
|||||||
DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
|
DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
@git archive \
|
@if git rev-parse 2> /dev/null ; then \
|
||||||
--prefix=$(DIST_SUBDIR)/ \
|
git archive \
|
||||||
--format=tar \
|
--prefix=$(DIST_SUBDIR)/ \
|
||||||
-o $(DIST_FILE) \
|
--format=tar \
|
||||||
HEAD
|
-o $(DIST_FILE) \
|
||||||
@git describe > $(BR)/.version
|
HEAD ; \
|
||||||
|
git describe > $(BR)/.version ; \
|
||||||
|
else \
|
||||||
|
(cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
|
||||||
|
src/scripts/version > $(BR)/.version ; \
|
||||||
|
fi
|
||||||
@tar --append \
|
@tar --append \
|
||||||
--file $(DIST_FILE) \
|
--file $(DIST_FILE) \
|
||||||
--transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
|
--transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
|
||||||
|
Reference in New Issue
Block a user