Branch: refs/heads/main
Revision: f499813
Author: stonea
Link: fix primer makefile to not build interopWithC helper makefile on 'make clean' by stonea · Pull Request #18695 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #18695 from stonea/fix_primer_makefile
fix primer makefile to not build interopWithC helper makefile on 'make clean'
This is to fix the issue with make clean
building the interop primer: COMPILE: 1.25.0: make clean error in primers · Issue #18464 · chapel-lang/chapel · GitHub
I detail the issue in this comment: COMPILE: 1.25.0: make clean error in primers · Issue #18464 · chapel-lang/chapel · GitHub and the bottom half of this comment: COMPILE: 1.25.0: make clean error in primers · Issue #18464 · chapel-lang/chapel · GitHub
The punchline is the Makefile for primers included this line:
-include lib/Makefile.interopWithC
Which links to a "helper Makefile" that we generate for the interop primer. The (main primer) Makefile includes a target to build this helper Makefile and this target would be executed indiscriminately, even when doing make clean
. In this PR I solve this problem by having the helper Makefile generated as part of the interopWithC target and separating the include line (and the target for the cClient) into a separate Makefile Makefile.cClient
.
I detail this solution in the comment here: COMPILE: 1.25.0: make clean error in primers · Issue #18464 · chapel-lang/chapel · GitHub
I also update the primer to note the existence of these two files.
[Reviewed by @bradcray]
Modified Files:
A test/release/examples/primers/Makefile.cClient
M test/release/examples/primers/Makefile
M test/release/examples/primers/README
M test/release/examples/primers/interopWithC.chpl
Compare: https://github.com/chapel-lang/chapel/compare/8bb386b273c3...f49981376906