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

Compatibility fix for newer make #406

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Compatibility fix for newer make #406

merged 1 commit into from
Apr 20, 2023

Conversation

hvdijk
Copy link
Collaborator

@hvdijk hvdijk commented Apr 12, 2023

Current NetBSD make adds support for setting system include directories using .SYSPATH. This support interferes with the Makefile's attempt to override the system include path by setting -m in .MAKEFLAGS. Luckily, this is easily avoided: the old -m approach effectively has no effect on newer make, and the newer .SYSPATH approach effectively has no effect on older make, so using both works with old and new make alike.

@hvdijk
Copy link
Collaborator Author

hvdijk commented Apr 12, 2023

With bmake from https://www.crufty.net/help/sjg/bmake.html, without this PR, only bmake-20230120 and older work, bmake-20230123 and newer result in

bmake: "/usr/share/mk/subdir.mk" line 93: Inconsistent operator for all
bmake: "/usr/share/mk/subdir.mk" line 93: Inconsistent operator for clean
egrep: warning: egrep is obsolescent; using grep -E
bmake: "/usr/share/mk/init.mk" line 90: Inconsistent operator for all
bmake: "/usr/share/mk/subdir.mk" line 102: Inconsistent operator for all
bmake: "/usr/share/mk/obj.mk" line 46: Malformed conditional (${MK_AUTO_OBJ} == "yes")
bmake: "/usr/share/mk/dpadd.mk" line 330: Malformed conditional (${.MAKE.MODE:Mmeta*} != "" && exists(${.MAKE.DEPENDFILE}))
bmake: "/usr/share/mk/prog.mk" line 140: Inconsistent operator for all
bmake: "/usr/share/mk/subdir.mk" line 102: Inconsistent operator for all
bmake: "/usr/share/mk/final.mk" line 11: Malformed conditional (${MK_STAGING} == "yes")
bmake: "/usr/share/mk/final.mk" line 18: Inconsistent operator for install
bmake: Fatal errors encountered -- cannot continue
bmake: stopped in /home/harald/libfsm

With this PR, the build completes without issues.

@katef
Copy link
Owner

katef commented Apr 12, 2023

Oh you're a star. Thank you so much

Current NetBSD make adds support for setting system include directories
using .SYSPATH. This support interferes with the Makefile's attempt to
override the system include path by setting -m in .MAKEFLAGS. Luckily,
this is easily avoided: the old -m approach effectively has no effect on
newer make, and the newer .SYSPATH approach effectively has no effect on
older make, so using both works with old and new make alike.
@hvdijk
Copy link
Collaborator Author

hvdijk commented Apr 13, 2023

The CI failure on the first attempt was specifically because .SYSPATH had no special effect in older bmake, which meant it being the initial target also made it the default target when no target is explicitly specified. Updated to set .MAIN explicitly.

@katef
Copy link
Owner

katef commented Apr 20, 2023

Incredible. Thanks for figuring that out, I was stumped.

@katef katef merged commit 01b7f71 into main Apr 20, 2023
@katef katef deleted the harald/make-compat branch April 20, 2023 16:28
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 this pull request may close these issues.

None yet

2 participants