On 5 January 2019 at 00:00, Iñaki Ucar wrote: | On Fri, 4 Jan 2019 at 20:10, Iñaki Ucar <iu...@fedoraproject.org> wrote: | > | > I see. Then I suggest the following hack (not tested). If the package | > has a vignette, put there a hidden chunk that generates a file with | > info about the branch and the path. This file will be available for | > your configure script, which runs at INSTALL time. There you can, | > e.g., retrieve that branch from a remote repo. | | Actually, if there is any vignette, the configure script is executed | during the build process, because R needs to install the package to | build the vignettes. There, you can rely on $OLDPWD to retrieve the | path to the package.
Not really. Consider ~/git/repo/proj-brnchA ~/git/repo/proj-brnchB ~/git/repo/proj-brnchC where each branch may have a in-repo build with static libraries and header. And I build Rpkg_0.1.0.tar.gz in each with R CMD build. I need inside of Rpkg_0.1.0.tar.gz a reference to whether we need headers from A, B or C. $OLDPWD does not (generally) give me that. Only if I invoked R CMD INSTALL in the path. My preference would be to do some "not unlink configure" which write down the path in src/Makevars. I think the vignette trick will let me do that but I have not had time to try. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel