Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

What is the purpose of MkRules.local.in and MkRules.rules ? #25

Closed
AndreMikulec opened this issue Feb 4, 2020 · 2 comments
Closed

What is the purpose of MkRules.local.in and MkRules.rules ? #25

AndreMikulec opened this issue Feb 4, 2020 · 2 comments

Comments

@AndreMikulec
Copy link

@jeroen

I am not finding the files MkRules.local.in and MkRules.rules anywhere in the docs

https://cran.r-project.org/doc/manuals/r-patched/R-admin.html

Are either meant to prepend/overwrite/append to specific entries or the entire file MkRules.local within the build process?

What does the ?= mean (of specifically) in the file MkRules.rules and the line

EOPTS ?= -mfpmath=sse -msse2

Is MkRules.rules read-in last?

Thanks,
Andre

@jeroen
Copy link
Contributor

jeroen commented Feb 4, 2020

MkRules.local.in gets copied into MkRules.local after some substitutions:

base/scripts/build.bat

Lines 47 to 48 in d9107a3

sed -e "s|@win@|%WIN%|" -e "s|@home@|%XR_HOME%|" -e "s|@home32@|%XHOME32%|"^
%SOURCEDIR%\files\MkRules.local.in > %R_HOME%/src/gnuwin32/MkRules.local

What does the ?= mean (of specifically) in the file MkRules.rules and the line
EOPTS ?= -mfpmath=sse -msse2

This is standard gnu make syntax that sets a variable if it has not been set yet. So you could override it by defining EOPTS in MkRules.local, but if unset, EOPTS will default to -mfpmath=sse -msse2

@AndreMikulec
Copy link
Author

Great answer! Thanks!

@jeroen jeroen closed this as completed Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants