From irederik m@iii@g oii oib@@et  Wed Jan  1 03:56:52 2020
From: irederik m@iii@g oii oib@@et (irederik m@iii@g oii oib@@et)
Date: Tue, 31 Dec 2019 18:56:52 -0800
Subject: [Rd] best way to build from Git
In-Reply-To: <CABtg=Kkr9P9=go2XCCZ5h9=hGipAo16Cw0ccCDWcogHwZsxV0Q@mail.gmail.com>
References: <20191226013717.GA320941@localhost>
 <CABtg=K=XO8+Ti6UGAGraaufh5T_ua7cFnC_tUnTE=vsmX4Dgyg@mail.gmail.com>
 <24068.43472.496118.798873@stat.math.ethz.ch>
 <CABtg=Kkr9P9=go2XCCZ5h9=hGipAo16Cw0ccCDWcogHwZsxV0Q@mail.gmail.com>
Message-ID: <20200101025652.GF466999@localhost>

Thank you all for your replies.

On Thu, Dec 26, 2019 at 01:06:48PM +0000, G?bor Cs?rdi wrote:
>On Thu, Dec 26, 2019 at 12:39 PM Martin Maechler
>> ...
>> It would probably really be useful, if Lionel (or someone else)
>> updated his nice write-up and auxiliary {script / make} - files
>> so things work too when build with "src-dir != build-dir".
>
>I am not sure what you mean, what is wrong with this build directory?
>https://bookdown.org/lionel/contributing/building-r.html#sec:build

Yes it seems that Lionel's instructions successfully build a Git repo
containing R into a separate build directory. Thank you Lionel.

I've adapted these instructions, together with Lionel's GNUmakefile
and make-svn-revision script, to suit my (Linux-based) environment. I
put it in a little GitHub repository. Currently the following commands
work for me to download and install R in my home directory:

     git clone https://github.com/navarum/tweaks
     PREFIX=~/.local ./tweaks/r/BUILD install

For now it applies one example patch on top of a fixed recent commit
to the upstream repo https://github.com/wch/r-source/ . I noticed that
the first commit hash I selected from 'git log' was not stable, so I'm
not sure if this script will work tomorrow or next week. However, I
thought I ought to share it in case others find it useful. I tried to
make the (Bash) code concise enough that it would be possible for
others to see what it is doing and adapt it to maintaining their own
patch series on top of some version of R. I've been using this tool to
maintain custom versions of other software packages as well, so there
may be a little "too much information" in there - but someone could
obviously fork it and keep just what they need. The system tries to be
somewhat intelligent about remembering whether configure was run,
checking if the patches need to be reapplied, not overwriting any
changes I might have made to the cloned r-source git repo, and so on.

Just for the record, my original question on this thread was about the
reasons for not having R's default build system work with different
revision control systems, as well as some apparent typos in the
Makefile that comes with R.

Thank you,

Frederick



[Rd] best way to build from Git
irederik m@iii@g oii oib@@et