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

Build script that creates necessary directories / files instead of platform-dependent Makefile #92

Open
radu-matei opened this issue Jul 6, 2021 · 3 comments

Comments

@radu-matei
Copy link
Member

We recently added support for building and running Wagi on Windows (#60) -- but because of the platform-dependent Makefile, you cannot make run on Windows.

We should either add a separate target for Windows, or move the logic to create the directories and certificates in a build.rs script.

Note that setting the log environment variables still needs to be in the Makefile, and that is going to have to be platform dependent.

@technosophos
Copy link
Contributor

I am not wading into the waters on Windows and Make. It's nearly impossible to keep a Makefile functional for Windows without making it a nightmare for everyone else.

So a build.rs is fine with me, or we could go back to using Just and Justfiles (which are explicitly tooled for running unixy commands on Windows). In fact, it might be worth trying to run just -f Makefile run to see if it even comes close to working as-is.

@bacongobbler
Copy link

bacongobbler commented Jul 7, 2021

Makefiles have never really had a great cross-platform story, unfortunately. Same for justfiles. Have a look at krustlet's justfile/justfile-windows story for example: https://github.com/deislabs/krustlet/blob/main/justfile-windows

Lotta code duplication just to have a "cross-platform" build toolchain.

@technosophos
Copy link
Contributor

So we seem to have a few options on the table:

  • a build.rs
  • a completely separate build script for Windows
  • a generic Makefile that somehow works for UNIXy and Windows
  • find another build system

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

3 participants