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

nimony: add basic ${path} to {.header.} for relative c include #448

Merged
merged 7 commits into from
Feb 4, 2025

Conversation

mrgaturus
Copy link
Contributor

@mrgaturus mrgaturus commented Feb 1, 2025

  • add replaceSubs helper to semos.nim to replace a pattern by an absolute path
  • add basic ${path} and ${nifcache}support to {.header.} + some tests
  • add a -I of root module path relative to nifcache in final makefile for nim 2.x backwards compatibility (see Add project directory to include path Nim#10012)

fixes #431

@mrgaturus mrgaturus changed the title nimony: add basic $path to {.header.} for relative c include nimony: add basic ${path} to {.header.} for relative c include Feb 1, 2025
@Araq
Copy link
Member

Araq commented Feb 1, 2025

  • Use relative paths if possible so that if we add the produced makefiles to the testsuite they can actually work.
  • The signature should be replaceSubs*(f, currentFile, nifDir: string): string
  • Use strutils.multiReplace in replaceSubs's implementation.

@mrgaturus
Copy link
Contributor Author

  • Use relative paths if possible so that if we add the produced makefiles to the testsuite they can actually work.
  • The signature should be replaceSubs*(f, currentFile, nifDir: string): string
  • Use strutils.multiReplace in replaceSubs's implementation.

I updated the ${path} and c include header thing to work as relative and updated the replaceSubs to support a ${nifcache}

@Araq Araq merged commit 68f7298 into nim-lang:master Feb 4, 2025
3 checks passed
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.

Backend C compiler fails to find the include file
3 participants