Makefile: add file with basic targets#74
Merged
Ralim merged 1 commit intopine64:masterfrom Mar 4, 2025
Merged
Conversation
ia
commented
Feb 4, 2025
Contributor
Author
ia
left a comment
There was a problem hiding this comment.
Just a few clarifications.
Comment on lines
+10
to
+11
| 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') |
Contributor
Author
There was a problem hiding this comment.
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" |
Contributor
Author
There was a problem hiding this comment.
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.
Comment on lines
+28
to
+32
| vars: | ||
| @echo "\n>>>> FILES_CMAKE:" | ||
| @echo "$(FILES_CMAKE)" | sed 's, ,\n,g' | ||
| @echo "\n>>>> FILES_SRC:" | ||
| @echo "$(FILES_SRC)" | sed 's, ,\n,g' |
Contributor
Author
There was a problem hiding this comment.
Good ol' printf-like debugging, since sometimes debugging make files even with trivial scenarios may be pretty painful.
Ralim
approved these changes
Mar 4, 2025
Collaborator
|
Thank you, and sorry for delay when I was off on holidays. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TO: @Ralim
CC: @gamelaster
Hello!
TL;DR: add a basic
Makefile(for a start) to simplifycmakebuild 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 buildblispcontains a few commands (mkdir build; cd build; cmake ...), which a user should type/copy'paste. ThisMakefilesimplify a process as easy as$ make. I understand the irony of addingGNUMakebuild file in the project usingCMakealready, 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
Makefilein 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: