janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.45k stars 223 forks source link

Addition of a build system generator #39

Closed elfring closed 5 years ago

elfring commented 5 years ago

I suggest to reuse a higher level build system than your current make script so that powerful checks for software features will become easier.

bakpakin commented 5 years ago

I used to have a CMake script for building Janet, which I then deleted as it was annoying to maintain and less flexible than a Makefile. I found CMake to not really be an improvement for portability. I do miss the easy development on Windows with visual studio, but a batch file works fine too.

A supplementary CMakeLists.txt for building would be useful, but not really on my roadmap.

elfring commented 5 years ago

How do you think about to support more development environments by the reuse of build system generators?

bakpakin commented 5 years ago

Build system generators are nice sometimes, but don’t really help with making things truly cross platform, they just smooth out the easiest step. Since I do most of the development for Janet in vim on Linux and occasionally Notepad++ on windows, IDE support is not so important to me.

Lastly, Janet has a bootstrap step that requires somewhat complicated rules. The CMake build, even before when it was simpler, required several custom commands to embed files in the binary.

Again, a CMake based build would be great and definitely help developers who wanted to use an IDE contribute, but not on my Roadmap. As for making Janet cross platform, I don’t think a build system generator is all that much help besides setting a handful of compiler flags, especially as Janet has basically no dependencies besides some basic Posix stuff and win32 on windows. Possibly pthreads in the future.

elfring commented 5 years ago

Does a tool like “autoscan” show any software dependencies that you find worth for further considerations?

bakpakin commented 5 years ago

No.