[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit c783435 2/3: make: Add check-declare target
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit c783435 2/3: make: Add check-declare target |
Date: |
Tue, 7 Dec 2021 18:57:57 -0500 (EST) |
branch: elpa/git-commit
commit c7834354f663ac9a9e6bbdc71947f8b2c36f8d65
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
make: Add check-declare target
It would be best to automatically run this after compiling, but for
most people that would result in false-positives because of missing
and entirely optional extensions but anyone can opt-in by adding
"check-declare" to LISP_EXTRA_TARGETS in config.mk.
---
Makefile | 4 ++++
lisp/Makefile | 9 +++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 12a5381..0481f02 100644
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,7 @@ help:
$(info make test - run tests)
$(info make test-interactive - run tests interactively)
$(info make emacs-Q - run emacs -Q plus Magit)
+ $(info make check-declare - check function declarations)
$(info )
$(info Release Management)
$(info ==================)
@@ -122,6 +123,9 @@ emacs-Q: clean-lisp
(require 'magit)\
(global-set-key \"\\C-xg\" 'magit-status))"
+check-declare:
+ @$(MAKE) -C lisp check-declare
+
## Clean #############################################################
clean: clean-lisp clean-docs clean-archives
diff --git a/lisp/Makefile b/lisp/Makefile
index 2a87e30..72dcc91 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -3,7 +3,7 @@ include ../default.mk
## ###################################################################
-.PHONY: magit-version.el install
+.PHONY: magit-version.el check-declare install
all: lisp
@@ -70,7 +70,7 @@ magit-obsolete.elc: magit.elc
## Build #############################################################
-lisp: $(ELCS) loaddefs
+lisp: $(ELCS) loaddefs $(LISP_EXTRA_TARGETS)
loaddefs: $(PKG)-autoloads.el
versionlib: $(PKG)-version.el
@@ -99,6 +99,11 @@ $(PKG)-version.el:
@printf "Generating $@\n"
@printf "%s" "$$VERSIONLIB_TMPL" > $@
+check-declare:
+ @printf "Checking function declarations\n"
+ @$(BATCH) -L $(TOP)../borg -L $(TOP)../forge/lisp \
+ --eval "(check-declare-directory default-directory)"
+
## Install ###########################################################
install: lisp versionlib