1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

Fix out-of-source ‘make check’ emacs-module-tests

Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.

(cherry picked from commit c86f3fe0d0)
This commit is contained in:
Paul Eggert 2020-07-09 16:35:48 -07:00 committed by Glenn Morris
parent f31c6792ab
commit cc7f971485
2 changed files with 4 additions and 3 deletions

View File

@ -258,9 +258,7 @@ endif
GMP_LIB = @GMP_LIB@
GMP_OBJ = $(if @GMP_OBJ@, ../src/@GMP_OBJ@)
# Note: emacs-module.h is generated from emacs-module.h.in, hence we
# look in ../src, not $(srcdir)/../src.
MODULE_CFLAGS = -I../src -I$(srcdir)/../lib \
MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)

View File

@ -318,6 +318,9 @@ local reference."
(with-temp-buffer
(let ((standard-output (current-buffer)))
(describe-function-1 #'mod-test-sum)
(goto-char (point-min))
(while (re-search-forward "`[^']*/data/emacs-module/" nil t)
(replace-match "`data/emacs-module/"))
(should (equal
(buffer-substring-no-properties 1 (point-max))
(format "a module function in `data/emacs-module/mod-test%s'.