emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/urgrep a7bc846d0d: Refactor Makefile so that all the pr


From: ELPA Syncer
Subject: [elpa] externals/urgrep a7bc846d0d: Refactor Makefile so that all the project-specific bits are up front
Date: Thu, 18 May 2023 15:59:09 -0400 (EDT)

branch: externals/urgrep
commit a7bc846d0d97438d7bded1c1ac29f1f49fc88746
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    Refactor Makefile so that all the project-specific bits are up front
---
 Makefile | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 86e4c9c977..daf964b565 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,13 @@
 # You should have received a copy of the GNU General Public License along with
 # this program.  If not, see <http://www.gnu.org/licenses/>.
 
+PACKAGE_NAME := urgrep
+PACKAGE_MAIN := $(PACKAGE_NAME).el
+AUTOLOADS := $(PACKAGE_NAME)-autoloads.el
+SRCS := $(filter-out $(AUTOLOADS), $(wildcard *.el))
+OBJS := $(patsubst %.el,%.elc,$(SRCS))
+TESTS := $(wildcard *-tests.el)
+
 EMACS ?= emacs
 export DEPS_DIR = $(shell realpath .deps)
 
@@ -36,10 +43,6 @@ EMACS_DEPS := $(EMACS) \
   --eval '(setq package-user-dir (getenv "DEPS_DIR"))' \
   --eval '(package-activate-all)'
 
-AUTOLOADS := urgrep-autoloads.el
-SRCS := $(filter-out $(AUTOLOADS), $(wildcard *.el))
-OBJS := $(patsubst %.el,%.elc,$(SRCS))
-
 .PHONY: all
 all: compile autoloads
 
@@ -51,13 +54,14 @@ autoloads: $(AUTOLOADS)
 
 .PHONY: install-deps
 install-deps:
-       @$(EMACS) -Q --batch urgrep.el --eval "$$INSTALL_SCRIPT"
+       @$(EMACS) -Q --batch $(PACKAGE_MAIN) --eval "$$INSTALL_SCRIPT"
 
 $(AUTOLOADS): $(SRCS)
        @echo AUTOLOAD $@
        @$(EMACS) -Q --batch \
          --eval '(package-initialize)' \
-         --eval '(package-generate-autoloads "urgrep" default-directory)'
+         --eval '(package-generate-autoloads "$(PACKAGE_NAME)" \
+           default-directory)'
 
 %.elc: %.el
        @echo ELC $@
@@ -76,8 +80,9 @@ lint:
 
 .PHONY: check
 check:
-       $(EMACS_DEPS) -Q --batch \
-         -L . -l urgrep-tests \
+       @echo TEST $(patsubst %.el,%,$(TESTS))
+       @$(EMACS_DEPS) -Q --batch \
+         -L . $(patsubst %.el,-l %,$(TESTS)) \
          --eval '(ert-run-tests-batch-and-exit t)'
 
 .PHONY: clean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]