Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_bg should also respect users Makevars #76

Closed
jimhester opened this issue Jun 24, 2019 · 2 comments · Fixed by #77
Closed

build_bg should also respect users Makevars #76

jimhester opened this issue Jun 24, 2019 · 2 comments · Fixed by #77

Comments

@jimhester
Copy link
Member

E.g. the code from

pkgbuild/R/compile-dll.R

Lines 41 to 50 in 01898ad

# If the user has a makevars file just use that
if (length(makevars_user()) > 0) {
install_min(
path,
dest = install_dir,
components = "libs",
args = if (needs_clean(path)) "--preclean",
quiet = quiet
)
} else {
should also be in build-bg.R

@gaborcsardi
Copy link
Member

@jimhester I don't get this. Seemingly compile_dll() is not called by build(). Or anywhere in the package, actually.

@gaborcsardi
Copy link
Member

OK, I think I understand now. There are three cases:

  • pkgload::load_all(), this calls pkgbuild::compile_dll(), and that uses the user Makevars, as above.
  • pkgbuild::build() just calls R CMD build without doing anything about Makevars, and R CMD build uses it automatically.
  • pkgbuild::pkgbuild_process sets up the compiler flags, and uses a temporary user Makevars, so the user's Makevars is ignored.

So in the spirit of pkgbuild::build(), pkgbuild_process should just rely on R CMD build and the user's Makevars, and not touch the compiler flags.

gaborcsardi added a commit that referenced this issue Jun 25, 2019
Instead just use the user's Makevars file.
Closes #76.
gaborcsardi added a commit that referenced this issue Jun 25, 2019
Instead just use the user's Makevars file.
Closes #76.
gaborcsardi added a commit that referenced this issue Jun 25, 2019
Instead just use the user's Makevars file.
Closes #76.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants