branch: externals/hyperbole commit 3d134a973332a58ef6fca8bf7a8a8b8f83f0bbb9 Author: Mats Lidell <mats.lid...@lidells.se> Commit: GitHub <nore...@github.com>
Add target that controls what byte compile warnings are displayed (#123) --- ChangeLog | 5 +++++ Makefile | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 64e4884..b8fc4a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-09-20 Mats Lidell <ma...@gnu.org> + +* Makefile (bin-warn): Control what warning messages to get when byte + compiling. + 2021-09-17 Mats Lidell <ma...@gnu.org> * hsettings.el (hyperbole-web-search-browser-function): Relax type to diff --git a/Makefile b/Makefile index b561749..87d8793 100644 --- a/Makefile +++ b/Makefile @@ -266,6 +266,25 @@ bin: src $(RM) *.elc kotl/*.elc $(EMACS) $(BATCHFLAGS) $(PRELOADS) -f batch-byte-compile $(EL_KOTL) $(EL_COMPILE) +# Byte compile files but apply a filter for either including or +# removing warnings. See variable {C-hv byte-compile-warnings RET} for +# list of warnings that can be controlled. Default is set to suppress +# warnings for long docstrings. +# +# Example for getting warnings for obsolete functions and variables +# HYPB_WARNINGS="free-vars" make bin-warn +# Example for surpressing the free-vars warnings +# HYPB_WARNINGS="not free-vars" make bin-warn +ifeq ($(origin HYPB_WARNINGS), undefined) +HYPB_BIN_WARN = not docstrings +else ifeq ($(origin HYPB_WARNINGS), environment) +HYPB_BIN_WARN = ${HYPB_WARNINGS} +endif +bin-warn: src + $(RM) *.elc kotl/*.elc + $(EMACS) $(BATCHFLAGS) $(PRELOADS) --eval="(setq-default byte-compile-warnings '(${HYPB_BIN_WARN}))" \ + -f batch-byte-compile $(EL_KOTL) $(EL_COMPILE) + tags: TAGS TAGS: $(EL_TAGS) $(ETAGS) $(EL_TAGS)