bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: maint.mk: improve the release procedure


From: Akim Demaille
Subject: Re: maint.mk: improve the release procedure
Date: Sat, 22 Sep 2012 12:18:53 +0200

Le 21 sept. 2012 à 16:44, Jim Meyering a écrit :

Hi!

>> diff --git a/top/maint.mk b/top/maint.mk
>> index 87bbde9..e8ea768 100644
>> --- a/top/maint.mk
>> +++ b/top/maint.mk
>> @@ -91,13 +91,22 @@ my_distdir = $(PACKAGE)-$(VERSION)
>> # Old releases are stored here.
>> release_archive_dir ?= ../release
>> 
>> +# Validate and return $(RELEASE_TYPE), or die.
>> +GET_RELEASE_TYPE =                                              \
>> +  $(if $(RELEASE_TYPE),                                         \
>> +    $(or $(shell case '$(RELEASE_TYPE)' in                      \
>> +                   (alpha|beta|stable) echo $(RELEASE_TYPE);;   \
>> +                 esac),                                         \
>> +       $(error invalid RELEASE_TYPE: $(RELEASE_TYPE))),         \
>> +    $(error RELEASE_TYPE undefined))
> 
> This looks like a fine improvement.
> However, can't you do it without the cost of a $(shell ...)?
> How about using $(findstring ...) instead?
> Would be nice, but not required.

I tried to do it in pure GNU Make, but I couldn't find a
means to do it.  For instance findstring finds alpha in
alphabet.  Could find a means to use filter or filter-out
either to make sure there is just one string, and one
I want.

I find it surprising that there is nothing available to
compare strings (but ifeq etc. which does not apply here:
I want the code to be run when the variable is read, not
when it is defined).

>> From 52cfcc3a334abd7e4b028bb502761e9a3281f7b9 Mon Sep 17 00:00:00 2001
>> From: Akim Demaille <address@hidden>
>> Date: Thu, 20 Sep 2012 11:10:34 +0200
>> Subject: [PATCH 3/3] maint.mk: provide "make upload" to ease uploading
>> 
>> See <http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00028.html>.
>> Do not depend simply on the current $(VERSION), as there may have been
>> new commits since the tarball generation.  Rather, rely on $(RELEASE),
>> as "make release-commit" already does.
>> 
>> For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
>> "make TYPE".
>> 
>> * top/maint.mk (upload_command, upload, release): New.
>> (RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
>> (VERSION): first word of $(RELEASE) is always right.
>> (emit_upload_commands): Adjust.
>> * top/README-release: Update.
> 
> This seems to mean that one will always have to specify RELEASE, even with
> "make upload"?

Actually it's a feature™: I was trying to use consistently
the same interface for this series of commands, rather than
different ones.

But saving all this in .prev-version would be fine too!

> ACK to all three.

Will do Monday.

> Thanks again.

My pleasure :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]