PATCH: Allow distdir to be overridden on make command line

Started by Craig Ringerover 11 years ago3 messages
#1Craig Ringer
craig@2ndquadrant.com
1 attachment(s)

Not just a one line patch, a one character patch.

Use ?= instead of = in distdir assignment, so it can be overridden on
the command line when building dist tarballs with patches.

Yes, you can just modify GNUMakefile.in, but that's extra noise in a
diff, adds merge conflicts, etc.

Please apply. Surely this is harmless?

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

0001-Allow-distdir-to-be-overridden-on-the-make-command-l.patchtext/x-patch; name=0001-Allow-distdir-to-be-overridden-on-the-make-command-l.patchDownload
>From 2a115f7b62dbe3f98ef2c011f3283a41af86fd15 Mon Sep 17 00:00:00 2001
From: Craig Ringer <craig@2ndquadrant.com>
Date: Fri, 29 Aug 2014 10:00:40 +0800
Subject: [PATCH] Allow distdir to be overridden on the make command line

This is useful for preparing dist tarballs for patches with
useful suffixes, such as:

    distdir='postgresql-$(VERSION)'-git$(git rev-parse --short HEAD)
---
 GNUmakefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GNUmakefile.in b/GNUmakefile.in
index 69e0824..b469e3a 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -76,7 +76,7 @@ GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
 
 ##########################################################################
 
-distdir	= postgresql-$(VERSION)
+distdir	?= postgresql-$(VERSION)
 dummy	= =install=
 garbage = =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
 
-- 
1.9.3

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Craig Ringer (#1)
Re: PATCH: Allow distdir to be overridden on make command line

On Fri, 2014-08-29 at 10:04 +0800, Craig Ringer wrote:

Not just a one line patch, a one character patch.

Use ?= instead of = in distdir assignment, so it can be overridden on
the command line when building dist tarballs with patches.

This is already possible without this patch.

You can also override the VERSION variable.

Moreover, you might be interested in the configure option
--with-extra-version.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Michael Paquier
michael.paquier@gmail.com
In reply to: Peter Eisentraut (#2)
Re: PATCH: Allow distdir to be overridden on make command line

On Sun, Aug 31, 2014 at 10:37 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

On Fri, 2014-08-29 at 10:04 +0800, Craig Ringer wrote:

Not just a one line patch, a one character patch.

Use ?= instead of = in distdir assignment, so it can be overridden on
the command line when building dist tarballs with patches.

This is already possible without this patch.

You can also override the VERSION variable.

Moreover, you might be interested in the configure option
--with-extra-version.

--with-extra-version is available as well with MSVC scripts on HEAD.
--
Michael