On Fri, Aug 6, 2021 at 3:47 PM Tim Keitt <tke...@gmail.com> wrote: > > As configure is not run on windows, but according to the writing extensions > docs you can run commands in Makevars, is that not preferable for simple > cases?
IMHO it's ultimately up to you. Do what makes your life easier as a package maintainer. If your package can be successfully configured using only Makevars, then that's probably simplest. If Windows needs special help, then it might be reasonable to have a separate Makevars.win file. If you need to perform some extra introspection about the user's machine, then you probably want a pair of configure and configure.win scripts. > What shell is active in Makevars? Is it "/bin/sh" or is make the > interpreter here? Since Makevars is just a Makefile, it is processed by make. Executed shell commands then depend on what shell make has been configured to use. That defaults to /bin/sh, but R installations might be configured to use a different shell instead. If you look within $(R RHOME)/etc/Makeconf you'll probably see something like: SHELL = /bin/sh But that might differ on different platforms. (I don't immediately recall how this is handled on Windows) I don't quite understand your question re: "is make the interpreter here?" -- make interprets Makefiles, which, while looking similar to shell scripts, are their own thing. Recipes are effectively just specially adorned shell commands, so while they are still interpreted by make per-se, it does so by sending those commands to a shell for execution. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html for the nitty gritty details. > Can we use $(shell ...cmd...) in Makevars on windows? I'm not sure where to > look for what syntax is in-play in the Makevars file during package > building other than trial-and-error. I think you would have to consult with the CRAN maintainers to be sure (assuming your question is whether CRAN would accept packages using GNU extensions only on Windows). While the toolchain on Windows is GNU-based and so GNU extensions are supported by the toolchain, it is theoretically possible (although, to me, very unlikely) this could change in the future. > THK > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel