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

What to do with the "cmdline macros can't be modified" NMAKE lameness? #30

Closed
xparq opened this issue Mar 27, 2023 · 0 comments
Closed

Comments

@xparq
Copy link
Owner

xparq commented Mar 27, 2023

The macro-def. precedence rules don't say that "take precedence" doesn't just mean the order they will be initialized, but also that they can only be set where they had been initialized! :-o (Actually, GNU make does it similarly, except they do provide the override keyword to control this!)

So, this will be either able or unable to fixup inputs depending on where their initial (e.g. default) value comes from! :-o

!if "$(out_dir)" == "" || "$(out_dir)" == "\"
!message out_dir is empty, fixing up!...
out_dir = .$(out_dir)
!message out_dir = $(out_dir)
!endif

(E.g. out_dir will always remain empty with nmake out_dir=!...)


OK, well, even though capitalizing the cfg. macro names (fortunately, NMAKE, too (like GNU make) is case-sensitive) + the normalizing step from / to \ provides a perfect reconciliation point, bridging the "externs" into "locals", but... it needs to be documented that they are still impossible to set on the command-line, because the recursive NMAKE calls will lose them anyway! :-(

-> Well, added the comment: # Note: the cfg. options can't be set on the NMAKE command line, only here!

@xparq xparq changed the title Workaround for the "cmdline macros can't be modified" NMAKE lameness What to do with the "cmdline macros can't be modified" NMAKE lameness? Mar 28, 2023
xparq added a commit that referenced this issue Mar 28, 2023
Issue #35: Capitalize the cfg. options
Issue #12: Allow customizing the main targets to build (& clean)
Issue #33: Custom build options: propagate them through recursion
Issue #10: Guard against empty base dirs in $(some_dir)/... constructs!
Issue #34: Add some tests
Issue #5: Reinforced support for spaces in the build dir itself
Issue #30: What to do with "cmdline macros can't be modified"?
Issue #31: That / vs \ mystery in the objs rule
@xparq xparq closed this as completed Mar 28, 2023
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

No branches or pull requests

1 participant