[Rd] best way to build from Git

irederik m@iii@g oii oib@@et irederik m@iii@g oii oib@@et
Thu Dec 26 02:37:17 CET 2019


Dear R-devel,

I checked out a recent copy of R via Subversion and made a few changes to the code. I wanted to commit them locally to my repo, just to stay organized and keep them separate from other changes I plan to make. However, I was not able to commit them because I don't think SVN allows this?

Plan B, check out a Git mirror of R, https://github.com/wch/r-source/

It has some instructions for building: https://github.com/wch/r-source/wiki

However, there are some complicated workarounds due to a commit from 2013 (https://github.com/wch/r-source/commit/4f13e5325dfbcb9fc8f55fc6027af9ae9c7750a3). And it only seems to succeed if the build directory is the same as the source directory.

Makefile.in has some odd stuff that might be related, like why is it checking for "$(srcdir)/doc/FAQ" rather than "$(top_builddir)/doc/FAQ"? Conversely, there is a check for "$(top_builddir)/.git" which I would expect to be in "$(srcdir)/.git" instead. And it runs "git svn info" which seems to take indefinitely long - I am not using "git svn", I'm just trying to build from a regular git repo. This is difficult to debug because it is inside an @if, so "make -n" still runs it. Also there are no comments to explain what e.g. the "svnonly" target is doing, or anything else.

After some time I still have little idea why it is necessary for the build system to depend on the revision control system. Clearly we are trying to do something fancy, but why not e.g. just failover to "Last Changed Date: unknown; not SVN" if SVN-REVISION is missing?

I am wondering if there is any plan to clean up this situation because it seems like a stumbling block for users who might want to contribute to R.

Thanks,

Frederick



More information about the R-devel mailing list