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

Macros.sh: map options/flags (which SUSUWU_PROCESS_* functions use) to descriptions (for --help output.) #24

Open
SwuduSusuwu opened this issue Nov 22, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@SwuduSusuwu
Copy link
Owner

Rationale: most programs support --help (which maps options/flags to short descriptions, such as make --help which uses the format -s, --silent, --quiet Don't echo recipes.). Macros.sh can do in the future (issue #21 will use this, build.sh will use this)

Perhaps maps (which issue #23 should use) can also produce --help outputs: for example, if .keys{"-s", "--silent", "--quiet"} maps to .functions{SUSUWU_PROCESS_Q()}, .functions can have a .description="Suppresses notices, disables set -x.".

@SwuduSusuwu SwuduSusuwu added documentation Improvements or additions to documentation good first issue Good for newcomers labels Nov 22, 2024
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`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant