This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[setup] Makefile.am patches


First patch to follow the usual convention of using annotated release
tags for determining the version (tag 4782666e90 as "release_2.869" for
testing).

>From 8d41c6e21673ce22f30e1b4738fe0bf7cdf7e09a Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Sat, 14 Feb 2015 18:42:12 +0100
Subject: [PATCH 1/2] Use git describe to determine release version

* Makefile.am (VER): Use git describe to determine release version.
  This requires the releases to have an annotated tag.
---
 Makefile.am | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 676f08d..fc8bc98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -276,11 +276,12 @@ inilint_SOURCES = \
 	csu_util/version_compare.h \
 	regex/regex.c
 
-VER := $(shell cd ${srcdir} && git rev-list master --count ChangeLog)
+VER := $(subst release_,,$(shell cd $(srcdir) && git describe --match release\* --abbrev=6 HEAD || "N/A"))
 
 setup_version.c : $(srcdir)/ChangeLog Makefile
+	echo "Setup version: " $(VER)
 	$(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
-	echo 'static const char version_store[] = VERSION_PREFIX " '${VER}'";';\
+	echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
 	echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
 	mv version.tmp setup_version.c
 
-- 
2.2.2

Second patch to re-enable source archive creation and using XZ instead
of BZip2 compression.

>From 634c001d6c56813ad2fa6784feec757f1bdc257d Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Sat, 14 Feb 2015 19:40:52 +0100
Subject: [PATCH 2/2] Create XZ compressed archive using git ls-files

* Makefile.am (setup-src): Create XZ compressed archive using git ls-files.
---
 Makefile.am | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fc8bc98..0803bbb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -279,7 +279,7 @@ inilint_SOURCES = \
 VER := $(subst release_,,$(shell cd $(srcdir) && git describe --match release\* --abbrev=6 HEAD || "N/A"))
 
 setup_version.c : $(srcdir)/ChangeLog Makefile
-	echo "Setup version: " $(VER)
+	@echo "Setup version: " $(VER)
 	$(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
 	echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
 	echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
@@ -291,15 +291,11 @@ res.o: @SETUP@.exe.manifest
 .rc.o:
 	$(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
 
-# static const char version_store[] = VERSION_PREFIX " 2.686";
 setup-src:
-	@ver=setup-$$(sed -n 's/^static const char version_store.* VERSION_PREFIX " \([^"]*\)".*$$/\1/p' setup_version.c);\
-	cd ${srcdir};\
-	rm -f $$ver;\
-	ln -sf . $$ver;\
-	cvs status -R | sed -n "s%^ *Repository revision:.*/cvs/cygwin-apps/setup/\(.*\),v%$$ver/\1%p" |\
-	sort | tar -T - -cjf ${CURDIR}/$$ver-src.tar.bz2;\
-	echo $$ver-src.tar.bz2; exec rm -f $$ver
+	@ver=setup-$(VER);\
+	cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
+	git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
+	echo $$ver-src.tar.xz; exec rm -f $$ver
 
 # optional: strip and compress executable
 .PHONY:	strip upx
-- 
2.2.2


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]