From 1b01601d3f5d34a267c47e5d1208aa01730dd157 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 30 May 2017 09:27:33 -0700 Subject: [PATCH] Skip .#* temporaries when finding sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this patch, ‘make check’ can fail with the diagnostic ‘invalid syntax in conditional’ if there is an Emacs temporary file whose name starts with ‘.#’, because the ‘#’ is treated as the start of a Make comment. * lisp/Makefile.in (loaddefs, tagsfiles, check-defun-deps): * test/Makefile.in (ELFILES): Skip files starting with ‘.’, so that the .#* files do not cause trouble. (We cannot easily skip just files starting with ‘.#’, since ‘#’ starts a Make comment!) --- lisp/Makefile.in | 8 ++++---- test/Makefile.in | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index ba4925fb792..653200577db 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -78,7 +78,7 @@ LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \ $(lisp)/net/tramp-loaddefs.el # All generated autoload files. -loaddefs = $(shell find ${srcdir} -name '*loaddefs.el') +loaddefs = $(shell find ${srcdir} -name '*loaddefs.el' ! -name '.*') # Elisp files auto-generated. AUTOGENEL = ${loaddefs} ${srcdir}/cus-load.el ${srcdir}/finder-inf.el \ ${srcdir}/subdirs.el ${srcdir}/eshell/esh-groups.el @@ -243,8 +243,8 @@ update-gnus-news: FORCE: .PHONY: FORCE -tagsfiles = $(shell find ${srcdir} -name '*.el') -tagsfiles := $(filter-out ${srcdir}/%loaddefs.el,${tagsfiles}) +tagsfiles = $(shell find ${srcdir} -name '*.el' \ + ! -name '.*' ! -name '*loaddefs.el') tagsfiles := $(filter-out ${srcdir}/ldefs-boot.el,${tagsfiles}) tagsfiles := $(filter-out ${srcdir}/eshell/esh-groups.el,${tagsfiles}) @@ -470,7 +470,7 @@ check-declare: ## This finds a lot of duplicates between foo.el and obsolete/foo.el. check-defun-dups: sed -n -e '/^(defun /s/\(.\)(.*/\1/p' \ - $$(find . -name '*.el' -print | \ + $$(find . -name '*.el' ! -name '.*' -print | \ grep -Ev '(loaddefs|ldefs-boot)\.el|obsolete') | sort | uniq -d # Dependencies diff --git a/test/Makefile.in b/test/Makefile.in index c9065d90d1b..49a4dfdfd8d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -138,7 +138,7 @@ ELFILES := $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \ -path "${srcdir}/data" -prune -o \ -name "*resources" -prune -o \ ${maybe_exclude_module_tests} \ - -name "*.el" -print) + -name "*.el" ! -name ".*" -print) ## .log files may be in a different directory for out of source builds LOGFILES := $(patsubst %.el,%.log, \ $(patsubst $(srcdir)/%,%,$(ELFILES))) -- 2.39.2