-
Notifications
You must be signed in to change notification settings - Fork 23
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
Makefile: add file with basic targets #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few clarifications.
FILES_CMAKE:=$(shell find . -path ./$(BUILD_DIR) -prune -false -o -type f -name '*.cmake' -o -type f -name 'CMakeLists.txt') | ||
FILES_SRC:=$(shell find . -path ./$(BUILD_DIR) -prune -false -o -type f -name '*.c' -o -type f -name '*.h') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partially snooped from IronOS/source/Makefile
, partially based on reading man find
and experimenting locally to make sure that everything works as it should.
@cmake -S . -B $(BUILD_DIR) -DBLISP_BUILD_CLI=ON | ||
@echo "\n>>>> Building...\n" | ||
@cmake --build $(BUILD_DIR) | ||
@echo "\n>>>> DONE: $(BUILD_BIN)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this particular output (path for blisp
binary) with one particular purpose: as a user I would like to see [to copy'paste & to use right away] the path to produced binary.
vars: | ||
@echo "\n>>>> FILES_CMAKE:" | ||
@echo "$(FILES_CMAKE)" | sed 's, ,\n,g' | ||
@echo "\n>>>> FILES_SRC:" | ||
@echo "$(FILES_SRC)" | sed 's, ,\n,g' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good ol' printf
-like debugging, since sometimes debugging make
files even with trivial scenarios may be pretty painful.
Thank you, and sorry for delay when I was off on holidays. |
TO: @Ralim
CC: @gamelaster
Hello!
TL;DR: add a basic
Makefile
(for a start) to simplifycmake
build process ofblisp
.As [advanced] user, I get used to "fire'n'forget" commands to build 3rd party open source software, i.e.
./build.sh
/make
/etc. I understand some advantages ofcmake
. Although even official documentation to buildblisp
contains a few commands (mkdir build; cd build; cmake ...
), which a user should type/copy'paste. ThisMakefile
simplify a process as easy as$ make
. I understand the irony of addingGNUMake
build file in the project usingCMake
already, but I noticed that there are already some configs & build files for 3rd party systems/distros (likenix
), so I hope that one more small build file won't hurt anybody.If you find it worthwhile, I will obligate myself to try as hard as I can to maintain & support this
Makefile
in the future (including verification & porting to be compatible with other *NIX systems like FreeBSD and macOS), and fixing any issues (since probably there are some anyway).Let me know, what you think!
I tested it briefly in Ubuntu 24.04, and it seems that basic functions work as they should: