diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-05-12 03:29:41 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-05-12 03:29:41 +0200 |
| commit | 4c63e84ce295387d74f0abdc83660b4de4500416 (patch) | |
| tree | 7460b6f7e9a14f383a20ad2d3ecefc4fced42715 | |
| parent | 2871b670f47b7d04d18abae56ce23ffd38a32249 (diff) | |
| download | makext-4c63e84ce295387d74f0abdc83660b4de4500416.tar.gz | |
Changed MK_ to MEX_
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | makext.mk | 16 |
3 files changed, 18 insertions, 18 deletions
@@ -1,6 +1,6 @@ -MK_DESCRIPTION="This provides some additional tools for makefiles." -MK_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." -MK_ASSURE="python3 ls tree clang" +MEX_DESCRIPTION="This provides some additional tools for makefiles." +MEX_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." +MEX_ASSURE="python3 ls tree clang" include makext.mk @@ -93,22 +93,22 @@ Targets: You can provide description for the project that will be displayed together with `help`. To do this provide this information in the -`MK_DESCRIPTION` variable. +`MEX_DESCRIPTION` variable. Same goes for license information. Provide this information by creating -`MK_LICENSE` variable. +`MEX_LICENSE` variable. If these variables are not present this information will not be displayed in the help. > [!IMPORTANT] -> Variables `MK_DESCRIPTION` and `MK_LICENSE` must be defined before you +> Variables `MEX_DESCRIPTION` and `MEX_LICENSE` must be defined before you > include `makext.mk` to your `Makefile`. This is needed because the way > GNU Make is parsing Makefiles. ```make -MK_DESCRIPTION="This provides some additional tools for makefiles." -MK_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." +MEX_DESCRIPTION="This provides some additional tools for makefiles." +MEX_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." include makext.mk @@ -143,7 +143,7 @@ be used. If programs are missing recipes can only partially be executed leaving project in a potentially broken state. ```make -MK_ASSURE="python3 ls tree clang" +MEX_ASSURE="python3 ls tree clang" include makext.mk @@ -152,7 +152,7 @@ build-app: .assure ``` `.assure` prerequisite will loop over the list of programs defined in -`MK_ASSURE` variable and in case one is missing will exit `make` with +`MEX_ASSURE` variable and in case one is missing will exit `make` with status code error 1. This will stop executing the recipe and therefore not execute anything in target `build-app`. @@ -24,23 +24,23 @@ endif # and adds description and license information if data provided. .PHONY: .help .help: -ifdef MK_DESCRIPTION - @echo "$(MK_DESCRIPTION)\n" | fmt +ifdef MEX_DESCRIPTION + @echo "$(MEX_DESCRIPTION)\n" | fmt endif @echo "Targets:" @grep -vE '^[[:space:]]' $(MAKEFILE_LIST) | grep -E '^.*:.* #' | sed -E 's/(.*):(.*):.*#(.*)/ \2###\3/' | column -t -s '###' -ifdef MK_LICENSE - @echo "\n$(MK_LICENSE)" | fmt +ifdef MEX_LICENSE + @echo "\n$(MEX_LICENSE)" | fmt endif -# Checks `MK_ASSURE` variable if all the programs declared actually +# Checks `MEX_ASSURE` variable if all the programs declared actually # exist on a machine. If not this exists make with error. .PHONY: .assure .assure: -ifndef MK_ASSURE - @echo "Variable MK_ASSURE is not defined. Can not check for programs." +ifndef MEX_ASSURE + @echo "Variable MEX_ASSURE is not defined. Can not check for programs." else - @for prog in $(shell echo $(MK_ASSURE)); do \ + @for prog in $(shell echo $(MEX_ASSURE)); do \ if ! which $$prog > /dev/null; then \ echo "Error: '$$prog' not found on this machine."; \ exit 1; \ |
