From maechler at stat.math.ethz.ch  Tue Jan 20 12:44:34 2015
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Tue, 20 Jan 2015 12:44:34 +0100
Subject: [Rd] [PATCH] Makefile: add support for git svn clones
In-Reply-To: <21693.34483.729086.121918@max.nulle.part>
References: <1421696001-21383-1-git-send-email-balbi@kernel.org>
	<54BD63B3.8090803@gmail.com> <20150119202025.GA28274@saruman>
	<54BD69A4.60600@gmail.com> <20150119203419.GA24996@saruman>
	<54BD6CBD.8070304@gmail.com> <20150119210041.GB25690@saruman>
	<CAFAN8vxnX5Bb-8rDP2mJZE0s4V7mjFBPBfPx2XO31gUtUccsUQ@mail.gmail.com>
	<54BD811A.5060309@gmail.com>
	<21693.34483.729086.121918@max.nulle.part>
Message-ID: <21694.16290.286981.607916@stat.math.ethz.ch>

>>>>> Dirk Eddelbuettel <edd at debian.org>
>>>>>     on Mon, 19 Jan 2015 16:35:31 -0600 writes:

    > On 19 January 2015 at 17:11, Duncan Murdoch wrote:
    > | The people who would have to maintain the patch can't test it.  

I agree that this is good reason to not add delicate code to the
R sources, indeed,  however, read on ..

    > I don't understand this.

    > The patch, as we may want to recall, was all of

    > +GIT := $(shell if [ -d "$(top_builddir)/.git" ]; then \
    > +	echo "git"; fi)
    > +

    > and

    > -	  (cd $(srcdir); LC_ALL=C TZ=GMT svn info || $(ECHO) "Revision: -99") 2> /dev/null \
    > +	  (cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \

the other thing needed -- apart from a similar patch to the Windows Makefile
is to make the above "portable" in the sense that it works for
standard make as opposed to just GNU make....
This requirement also helps portability to (albeit rare I think) platforms.
AFAICS, this simply needs replacement of  
	$(shell  <stuff>)
by      ` <stuff> `

    > I believe you can test that builds works before applying the patch, and
    > afterwards---even when you do not have git, or in this case a git checkout.

    > The idiom of expanding a variable to "nothing" if not set is used all over
    > the R sources and can be assumed common.  And if (hypothetically speaking)
    > the build failed when a .git directory was present?  None of R Core's concern
    > either as git was never supported.

    > I really do not understand the excitement over this.  The patch is short,
    > clean, simple, and removes an entirely unnecessary element of friction.

I agree partly - as I agree with Duncan's points -
and for this case, in spite of good reasons why such a patch can
be problematic to accept, I'm tending to think of  "sponsoring"
it, i.e., putting
it in *and* maintain it (if that maintenance is close to "nil" :-),
notably after you add the changes mentioned above.  

As, indeed, I don't see how it can harm, and you, the git users
among us (= "the people interested in tracking R development
sources") would keep some responsibility with it.

I would like to keep us in a good "community" spirit of
collaborating and focused on the advancement of Free Software in
general and of R in particular, and so help each other as much
as possible with the limited resources we have....

Best,
Martin



[Rd] [PATCH] Makefile: add support for git svn clones
Martin Maechler