-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Include simple make
tool in ./Macros.sh
. Allow ./build.sh
to use make
(if installed).
#21
Labels
Milestone
Comments
SwuduSusuwu
added this to the Include simple `make` tool in `./Macros.sh`. Allow `./build.sh` to use `make` (if installed). milestone
Nov 20, 2024
SwuduSusuwu
added a commit
that referenced
this issue
Nov 20, 2024
codeflows too. Is for issue #21 (but also, somewhat, for issue #18). Is followup to: 3ee82e4 (?`Macros.sh`: more close to `make` protocols). ?`Macros.sh`: ?`SUSUWU_SETUP_BUILD_FLAGS()`: +`OBJECTLIST=""`. ?`SUSUWU_SETUP_OUTPUT()`: +`BUILDNEW={true,false}`. Moved below `SUSUWU_SETUP_BINDIR` (plus `SUSUWU_SETUP_OBJDIR`), since `BUILDNMEW` depends on `BINDIR` (also since `BINDIR` (plus `OBJDIR`) is used first throughout `Macros.sh`). ?`SUSUWU_CLEAN_OUTPUT()`: hide error messages (without dangerous `-f` flag). `:%s/NOTICE/INFO/`: isn't usual path. -`SUSUWU_CLEAN_OUTPUT()`: to shorten/reuse messages (avoids out-of-sync changes to messages,) split into +`SUSUWU_CLEAN_OUTPUT_IMPL()`, +`SUSUWU_CLEAN_OUTPUT()`, +`SUSUWU_REBUILD_OUTPUT()` (, which have comments on howto use.) ?`SUSUWU_PROCESS_CLEAN_REBUILD()`, ?`SUSUWU_PROCESS_SOURCES()`: use new {`SUSUWU_CLEAN_OUT()`,`SUSUWU_REBUILD_OUTPUT()`} functions. ?`SUSUWU_PROCESS_MINGW()`, ?`SUSUWU_SETUPCXX()`: -`CXXFLAGS_DEBUG+=CXXFLAGS_FSAN`, +`USE_FSAN={true, false}`. ?`SUSUWU_PROCESS_RELEASE_DEBUG()`: If `USE_FSAN`; `CXXFLAGS+=FLAGS_FSAN`, `LDFLAGS+=FLAGS_FSAN`, `export ASAN_OPTIONS=...`. Comment typo (mismatched ``) fix. ?`SUSUWU_PROCESS_INCLUDE()`: `:%s/${CXX_SOURCE_PATH}/$(dirname ${SOURCE})\//` (non-C++ path fix.) ?`SUSUWU_BUILD_SOURCES()`: -`SUSUWU_BUILD_SOURCES()`: since it used hardcoded suffixes plus paths, split into; So multiple `SUSUWU_BUILD_OBJECTS()` calls won't duplicated those: -`OBJECTLIST=""` (moved into ?`SUSUWU_SETUP_BUILD_FLAGS()`,) -`BUILDNEW={true,false}` (moved into ?`SUSUWU_SETUP_OUTPUT()`.) +`SUSUWU_BUILD_OBJECTS()`: Has comment (on howto pass suffix plus paths.) `:%s/test -e/test -s/` (exists -> non-zero plus exists). +`SUSUWU_BUILD_EXECUTABLE()`: Is generic (without params.) If linker errors; print status code, plus suggest howto fix this. ?`SUSUWU_TEST_OUTPUT()`: if `./build.sh --mingw`, test that `wine` exists ("./bin/a.exe: 1: Syntax error: word unexpected (expecting ")")" fix.) +`SUSUWU_TODO_LIST()`: allows to reuse common "TODO" messages for unimplemented features. +`SUSUWU_FORMAT()`, +`SUSUWU_DOCS()`, +`SUSUWU_INSTALL()`, +`SUSUWU_UNINSTALL()`: placeholders for common `make` tools. ?`Macros.sh`, ?`build.sh`: `:%s/CXXFLAGS_FSAN/FLAGS_FSAN`: to prevent "ld.lld: error: undefined symbol: __asan_*", `${LDFLAGS}` must have `-fsan*`. ?`build.sh`: ?`SUSUWU_SETUP_OUTPUT`: since it now uses `OBJDIR`, move down below `SUSUWU_SETUP_OBJDIR`. -`SUSUWU_BUILD_SOURCES`: `Macros.sh` split this into multiple functions. +`SUSUWU_BUILD_OBJECTS "${CC} ${CCFLAGS}" ".c" "${C_SOURCE_PATH}rfc6234/sha1.c" "${C_SOURCE_PATH}rfc6234/sha224-256.c" "${C_SOURCE_PATH}rfc6234/sha384-512.c`. +`SUSUWU_BUILD_OBJECTS "${CXX} ${CXXFLAGS}" ".cxx" "${CXX_SOURCE_PATH}*.cxx"` +`SUSUWU_BUILD_EXECUTABLE` ?`SUSUWU_SETUP_CXX`, ?`SUSUWU_SETUP_BUILD_FLAGS`, ?`SUSUWU_TEST_OUTPUT`: Now has comment.
SwuduSusuwu
added
improve
New feature or request
good first issue
Good for newcomers
labels
Nov 20, 2024
SwuduSusuwu
added a commit
that referenced
this issue
Nov 20, 2024
more close to `make` protocols, improve codeflow. ?`Macros.sh`: ?`SUSUWU_PROCESS_MINGW()`: move `CXX=` into ?`SUSUWU_SETUP_CXX()`. ?`SUSUWU_SETUP_CXX()`: if inherit `CXX` from global environment; also inherit `CC`, also inherit `LD`. ?`SUSUWU_SETUP_BUILD_FLAGS()`: move `CXX=` into ?`SUSUWU_SETUP_CXX()`. +`SUSUWU_PROCESS_BINDIR()`: used in `SUSUWU_INSTALL`, `SUSUWU_UNINSTALL` (to detect install path for executables.) ?`SUSUWU_INSTALL()`: implement, but there is just 1 output file to install (for now.) ?`SUSUWU_UNINSTALL()`: implement, but there is just 1 output file to uninstall (for now.) ?`build.sh`: test `SUSUWU_INSTALL` && `SUSUWU_UNINSTALL`. Is followup to: d6332e9 (?`Macros.sh`: more close to `make` protocols, improve), Is progress to issues: #18 (support more tools), #21 (mimic `make` protocol).
SwuduSusuwu
added a commit
that referenced
this issue
Nov 20, 2024
... much improved, plus typo fixes. ?`Macros.sh: `:%s/SUSUWU_PROCESS_MINGE/SUSUWU_PROCESS_MINGW/`: typo fix. ?`SUSUWU_SUFFIX_SLASH()`, ?`SUSUWU_AFFIX_DOTSLASH()`: `:%s/$1/${1}/`: style/typo fix. ?`SUSUWU_PRINT()`: style/comment improved. ?`SUSUWU_PROCESS_MINGW()`, ?`SUSUWU_PROCESS_RELEASE_DEBUG()`, ?`SUSUWU_PROCESS_CLEAN_REBUILD()`: `:%s/ -o / -o /` (typo fix). ?`SUSUWU_SETUP_CXX()`: quote `${CROSS_COMP}`. ?`SUSUWU_PROCESS_INCLUDE()`, ?`SUSUWU_BUILD_OBJECTS()`: limit temp variables to `local` scope. ?`SUSUWU_PROCESS_USRBIN()`: to prevent `cp: cannot create regular file '${USRBIN}/${OUTPUT}': Read-only file system`, prefer `USRBIN in ~/`. ?`SUSUWU_BUILD_CTAGS()`: move down to rest of `SUSUWU_BUILD_*()` functions (since now uses `${C_SOURCE_PATH}` and `${CXX_SOURCE_PATH}`, unless you execute as `SUSUWU_BUILD_CTAGS "-flags..." "./path/"`). ?`SUSUWU_TEST_OUTPUT()`: if ` --mingw` but "wine not found", `return 1`. `:%s/$?/$@/`, `:%s/STATUS=$@/STATUS=$?/`: typo fix ("Usage: ... $?" -> "Usage: ... ?@".) ?`build.sh`: ?`SUSUWU_BUILD_CTAGS`: Move down to rest of `SUSUWU_BUILD_*` calls. Now produces `./tags` (which `ex`, `vi`, `vim` can use.) Comment how to use this. ?`SUSUWU_PROCESS_MINGW`: comment how to use this. ?`README.md`: ?`#Contributor-conventionsrules`: English improved, `:%s/Git/`git`/`, `:%s/[Source](#Source),[_C_/_C++_ source](#Cc-source)/`, +"[`sh` source](#Sh-source)". Is followup to: f041ae9 (?`SUSUWU_[UN]INSTALL()`: implement. ?`Macros.sh`: more close to `make` protocols, improve codeflow). Is progress to issues: #18 (support more tools), #21 (full `make` support).
SwuduSusuwu
added a commit
that referenced
this issue
Nov 22, 2024
+`SUSUWU_PROCESS_VERBOSE()` [Usage: `./build.sh --verbose`]. Analogous to `make -s`, `make --verbose` (issue #21 is to mimic `make` protocols). ?`Macros.sh`: +`TODO:` list (issues #22, #23, #24, which all relate to small misc functions (such as `SUSUWU_PROCESS_S()`). +`SUSUWU_PRINT()`: if `SUSUWU_SH_NOTICE` && !`SUSUWU_S`, don't print. if `SUSUWU_SH_DEBUG` && !`SUSUWU_VERBOSE`, don't print. +`SUSUWU_PROCESS_S()`: sets `SUSUWU_S`, disables all `set -x` (default is for `CC`, `CXX`, `LD` to output). +`SUSUWU_PROCESS_S()`: sets `SUSUWU_VERBOSE`, forces `set -x` output (so all codes printout). ?`build.sh`: +`SUSUWU_PROCESS_S $@`: passes `-s` (if called as `./build.sh -s`) to `SUSUWU_PROCESS_S()`. +`SUSUWU_PROCESS_VERBOSE $@`: passes `--verbose` (if called as `./build.sh --verbose`) to `SUSUWU_PROCESS_VERBOSE()`. Is followup to:658da2f6c7bb733df1b34346c351307767b386cf (... Uses `. ./Macros.sh` to follow `README.md` output format rules ...), 96c362e (@make.sh ... `set -x`).
SwuduSusuwu
added a commit
that referenced
this issue
Nov 28, 2024
?`build.sh`, ?`Macros.sh: -`CXXFLAGS_SPECIAL`, +`FLAGS_SPECIAL`; not specific to `CXX`. -`CXXFLAGS_ANALYSIS`, +`FLAGS_ANALYSIS`; not specific to `CXX`. Is followup to: commit 64ca540 (?build.sh:+CXX_FLAGS_ANALYSIS ,,,) ?`CXXFLAGS_DEBUG`; remove flags not specific to `CXX`. +`FLAGS_DEBUG`; pass to both `CC` and `CXX`. Is followup to: commit 8727038 (?`build.sh`:?`CXX_FLAGS_DEBUG` split in 2) -`CXXFLAGS_RELEASE`, +`FLAGS_RELEASE`; not specific to `CXX`. `:%s/CCFLAGS/CFLAGS/`; typo fix, now can inherit `CFLAGS` from environment of user. Is followup to: commit 4fef864 (`:%s/_FLAGS/FLAGS/`: most projects do not include those underscores.), which should have fixes this. Assists with issue #21 (analogous `make` tools). ?`Macros.sh`: `SUSUWU_SETUP_BUILD_FLAGS()`: use `FLAGS_SPECIAL` Is followup to: commit 3ee82e4 (... +`CXXFLAGS_SPECIAL`: For `README.md` flags. ?`CXXFLAGS`: Now includes `CXXFLAGS_SPECIAL`.), which forgot to include `CXXFLAGS_SPECIAL`.
SwuduSusuwu
added a commit
that referenced
this issue
Dec 1, 2024
?`build.sh`: -`#CXXFLAGS_DEBUG="${CXXFLAGS_DEBUG} -fno-optimize-sibling-calls"`, +`#FLAGS_DEBUG="${FLAGS_DEBUG} -fno-optimize-sibling-calls"`; `-fno-optimize-sibling-calls` is not specific to C++. ?`Macros.sh`: ?`SUSUWU_PROCESS_RELEASE_DEBUG()`: -`CFLAGS="${LDFLAGS}`, +`CFLAGS="${CFLAGS}`; typo fix. Is followup to: commit 9ba840a (-`CXXFLAGS_SPECIAL`, +`FLAGS_SPECIAL`: pass to both), which removed `-Og` from `./c/RFC6234/` (`sha2()` throughput regression`). ?`SUSUWU_PROCESS_RELEASE_DEBUG()`, ?`SUSUWU_SETUP_BUILD_FLAGS()`: Move `CFLAGS` before `CXXFLAGS`; `CFLAGS` is used before `CXXFLAGS`, use that order all throughout. ?`SUSUWU_BUILD_OBJECTS()`: Comment fix (commands&options now wrapped in quotes). `:%s/OLD_ARG_1/BUILD/`, `:%s/OLD_ARG_2/SOURCE_SUFFIX/`; more descriptive.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue #18 has some commits which assist with this, but covers lots of other tools and does not depend on a full
make
tool.The text was updated successfully, but these errors were encountered: