Added screening for all included files in Makefile

Author Mitja Felicijan <mitja.felicijan@gmail.com> 2024-05-12 02:03:46 +0200
Committer Mitja Felicijan <mitja.felicijan@gmail.com> 2024-05-12 02:03:46 +0200
Commit 4ea24424833d36602b2949d6e22e15e09dad87f2 (patch)
-rw-r--r-- Makefile 4
-rw-r--r-- makext.mk 10
2 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
1
M_DESCRIPTION="This provides some additional tools for makefiles."
1
MK_DESCRIPTION="This provides some additional tools for makefiles."
2
M_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information."
2
MK_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information."
3
  
3
  
4
include makext.mk
4
include makext.mk
5
  
5
  
...
diff --git a/makext.mk b/makext.mk
...
13
# to learn more and contribute to the project.
13
# to learn more and contribute to the project.
14
  
14
  
15
.help:
15
.help:
16
ifdef M_DESCRIPTION
16
ifdef MK_DESCRIPTION
17
	@echo "$(M_DESCRIPTION)\n" | fmt
17
	@echo "$(MK_DESCRIPTION)\n" | fmt
18
endif
18
endif
19
	@echo "Targets:"
19
	@echo "Targets:"
20
	@grep '^.*:.* #' Makefile | sed -E 's/(.*):.*#(.*)/ \1###\2/' | column -t -s '###'
20
	@grep -vE '^[[:space:]]' $(MAKEFILE_LIST) | grep -E '^.*:.* #' | sed -E 's/(.*):.*#(.*)/  \1###\2/' | column -t -s '###'
21
ifdef M_LICENSE
21
ifdef MK_LICENSE
22
	@echo "\n$(M_LICENSE)" | fmt
22
	@echo "\n$(MK_LICENSE)" | fmt
23
endif
23
endif