dtc: Makefile improvements for release uploading

This has some fixes to the make dist target, and a new make kup target for
maintainer convenience uploading new releases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2016-09-03 21:02:30 +10:00
parent 1ed45d40a1
commit ec02b34c05
1 changed files with 20 additions and 4 deletions

View File

@ -197,10 +197,26 @@ fdtget: $(FDTGET_OBJS) $(LIBFDT_archive)
fdtput: $(FDTPUT_OBJS) $(LIBFDT_archive)
dist:
git archive --format=tar --prefix=dtc-v$(dtc_version)/ HEAD \
> ../dtc-v$(dtc_version).tar
cat ../dtc-v$(dtc_version).tar | \
gzip -9 > ../dtc-v$(dtc_version).tgz
git archive --format=tar --prefix=dtc-$(dtc_version)/ HEAD \
> ../dtc-$(dtc_version).tar
cat ../dtc-$(dtc_version).tar | \
gzip -9 > ../dtc-$(dtc_version).tar.gz
#
# Release signing and uploading
# This is for maintainer convenience, don't try this at home.
#
ifeq ($(MAINTAINER),y)
GPG = gpg2
KUP = kup
KUPDIR = /pub/software/utils/dtc
kup: dist
$(GPG) --detach-sign --armor -o ../dtc-$(dtc_version).tar.sign \
../dtc-$(dtc_version).tar
$(KUP) put ../dtc-$(dtc_version).tar.gz ../dtc-$(dtc_version).tar.sign \
$(KUPDIR)/dtc-$(dtc_version).tar.gz
endif
#
# Testsuite rules