* [PATCH] Fix out-of-source `make check` failure
@ 2020-07-08 14:25 Koki Fukuda
2020-07-09 23:41 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Koki Fukuda @ 2020-07-08 14:25 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Hi,
I tried out-of-source build and encountered the following compilation
failure.
In file included from
/home/kofu/source/emacs/test/data/emacs-module/mod-test.c:20:
../src/config.h:2463:10: fatal error: conf_post.h: No such file or directory
2463 | #include <conf_post.h>
| ^~~~~~~~~~~~~
compilation terminated.
. . .
This is because MODULE_CFLAGS in test/Makefile.in includes ../src, that
is directory for *generated* files, but conf_post.h is not a generated
file.
In this patch, I added $(srcdir)/../src to the list to make
out-of-source compilation to success.
Thanks.
--
Koki Fukuda
ko.fu.dev@gmail.com
[-- Attachment #2: 0001-Fix-out-of-source-build-error.patch --]
[-- Type: text/x-patch, Size: 936 bytes --]
From 0e3877b9110f2cc81e613eea75605354fff57557 Mon Sep 17 00:00:00 2001
From: Koki Fukuda <ko.fu.dev@gmail.com>
Date: Wed, 8 Jul 2020 22:55:18 +0900
Subject: [PATCH] Fix out-of-source build error
* test/Makefile.in (MODULE_CFLAGS): Add include dir to make out-of-source
build success
---
test/Makefile.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index f03c194a7c..5dea818df7 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -260,7 +260,9 @@ 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 \
+# We also include $(srcdir)/../src because emacs-module.h depends
+# on conf_post.h.
+MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I$(srcdir)/../lib \
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix out-of-source `make check` failure
2020-07-08 14:25 [PATCH] Fix out-of-source `make check` failure Koki Fukuda
@ 2020-07-09 23:41 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2020-07-09 23:41 UTC (permalink / raw)
To: Koki Fukuda; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
On 7/8/20 7:25 AM, Koki Fukuda wrote:
> This is because MODULE_CFLAGS in test/Makefile.in includes ../src, that is
> directory for *generated* files, but conf_post.h is not a generated file.
Thanks for mentioning that. The patch you sent wasn't enough to get 'make check'
to work in master, so I installed the attached more-elaborate patch into the
master branch.
I get the feeling that out-of-source 'make check' isn't tested much, as there
are failures in other tests too. But one step at a time.
[-- Attachment #2: 0001-Fix-out-of-source-make-check-emacs-module-tests.txt --]
[-- Type: text/plain, Size: 1968 bytes --]
From c86f3fe0d023cdd25edbbce91c5b32654f2b734e Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 9 Jul 2020 16:35:48 -0700
Subject: [PATCH] =?UTF-8?q?Fix=20out-of-source=20=E2=80=98make=20check?=
=?UTF-8?q?=E2=80=99=20emacs-module-tests?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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.
---
test/Makefile.in | 4 +---
test/src/emacs-module-tests.el | 3 +++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 10e3d9617d..c4840670e6 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -258,9 +258,7 @@ FPIC_CFLAGS =
GMP_H = @GMP_H@
LIB_GMP = @LIB_GMP@
-# 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)
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 6851b89045..411b4505da 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -288,6 +288,9 @@ module/describe-function-1
(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'.
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-09 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 14:25 [PATCH] Fix out-of-source `make check` failure Koki Fukuda
2020-07-09 23:41 ` Paul Eggert
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).