GNU bug report logs -
#30198
26.0.91; [PATCH] Fix emacs-module-tests to work with out of tree build directory
Previous Next
Reported by: Andy Moreton <andrewjmoreton <at> gmail.com>
Date: Sun, 21 Jan 2018 18:45:01 UTC
Severity: normal
Tags: patch
Found in version 26.0.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30198 in the body.
You can then email your comments to 30198 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30198
; Package
emacs
.
(Sun, 21 Jan 2018 18:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andy Moreton <andrewjmoreton <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 21 Jan 2018 18:45:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Currently the emacs module tests fail to build when using an out of tree
build directory. The following patch moves the location of the module
library mod-test.{so,dll} from test/data/emacs-module to
<builddir>/test/data/emacs-module, as build outputs do not belong in the
source tree. It also fixes the test module build to find the module header
at the correct lcoation, namely <builddir>/src/emacs-module.h.
Tested on Windows with the mingw64-x86_64 toolchain (msys2) for both
both in-tree and out-of-tree build directories:
Fix emacs-module-tests to work with an out of tree build directory
* test/Makefile.in(test_module_dir): Build the test module library in
a subdirectory of the build directory (not the source tree).
(MODULE_CFLAGS): Fix location of emacs-module.h header file.
(test_module): Move built library out of the source tree.
* test/src/emacs-module-tests.el(mod-test-file): Locate the test module
library relative to the running emacs executable.
diff --git a/test/Makefile.in b/test/Makefile.in
index 341b09b03f..7c5976435c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -119,7 +119,7 @@ emacs =
EMACS_TEST_DIRECTORY=$(abspath $(srcdir)) \
$(GDB) "$(EMACS)" $(MODULES_EMACSOPT) $(EMACSOPT)
-test_module_dir := $(srcdir)/data/emacs-module
+test_module_dir := data/emacs-module
.PHONY: all check
@@ -222,12 +222,13 @@ FPIC_CFLAGS =
FPIC_CFLAGS = -fPIC
endif
-MODULE_CFLAGS = -I$(srcdir)/../src $(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
+MODULE_CFLAGS = -I../src $(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
test_module = $(test_module_dir)/mod-test${SO}
src/emacs-module-tests.log: $(test_module)
-$(test_module): $(test_module:${SO}=.c) $(srcdir)/../src/emacs-module.h
+$(test_module): ${srcdir}/$(test_module:${SO}=.c) ../src/emacs-module.h
+ $(AM_V_at)${MKDIR_P} $(dir $@)
$(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \
-o $@ $<
endif
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index d9406a9609..85d6305386 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -25,8 +25,7 @@ mod-test-emacs
(eval-and-compile
(defconst mod-test-file
- (substitute-in-file-name
- "$EMACS_TEST_DIRECTORY/data/emacs-module/mod-test")
+ (expand-file-name "../test/data/emacs-module/mod-test"
invocation-directory)
"File name of the module test file."))
(require 'mod-test mod-test-file)
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 26 Jan 2018 13:32:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andy Moreton <andrewjmoreton <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 26 Jan 2018 13:32:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 30198-done <at> debbugs.gnu.org (full text, mbox):
> From: Andy Moreton <andrewjmoreton <at> gmail.com>
> Date: Sun, 21 Jan 2018 18:44:16 +0000
>
> Currently the emacs module tests fail to build when using an out of tree
> build directory. The following patch moves the location of the module
> library mod-test.{so,dll} from test/data/emacs-module to
> <builddir>/test/data/emacs-module, as build outputs do not belong in the
> source tree. It also fixes the test module build to find the module header
> at the correct lcoation, namely <builddir>/src/emacs-module.h.
>
> Tested on Windows with the mingw64-x86_64 toolchain (msys2) for both
> both in-tree and out-of-tree build directories:
Thanks, pushed to the master branch.
(Note that your mailer caused the patch fail to apply due to changes
in whitespace.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30198
; Package
emacs
.
(Fri, 26 Jan 2018 15:00:01 GMT)
Full text and
rfc822 format available.
Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
On Fri 26 Jan 2018, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton <at> gmail.com>
>> Date: Sun, 21 Jan 2018 18:44:16 +0000
>>
>> Currently the emacs module tests fail to build when using an out of tree
>> build directory. The following patch moves the location of the module
>> library mod-test.{so,dll} from test/data/emacs-module to
>> <builddir>/test/data/emacs-module, as build outputs do not belong in the
>> source tree. It also fixes the test module build to find the module header
>> at the correct lcoation, namely <builddir>/src/emacs-module.h.
>>
>> Tested on Windows with the mingw64-x86_64 toolchain (msys2) for both
>> both in-tree and out-of-tree build directories:
>
> Thanks, pushed to the master branch.
>
> (Note that your mailer caused the patch fail to apply due to changes
> in whitespace.)
Thanks. This also applies cleanly (and works) on emacs-26, if you feel
that it is not too disruptive for the release branch.
AndyM
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30198
; Package
emacs
.
(Fri, 26 Jan 2018 15:43:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 30198 <at> debbugs.gnu.org (full text, mbox):
> From: Andy Moreton <andrewjmoreton <at> gmail.com>
> Date: Fri, 26 Jan 2018 13:58:04 +0000
>
> This also applies cleanly (and works) on emacs-26, if you feel that
> it is not too disruptive for the release branch.
I thought about that, but eventually decided it wasn't worth the risk,
as the problem is not urgent to fix.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30198
; Package
emacs
.
(Fri, 26 Jan 2018 19:55:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 30198 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
>> This also applies cleanly (and works) on emacs-26, if you feel that
>> it is not too disruptive for the release branch.
>
> I thought about that, but eventually decided it wasn't worth the risk,
> as the problem is not urgent to fix.
It's hard to see any risk, since the entire test/ directory is not
included in release tarfiles.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30198
; Package
emacs
.
(Fri, 26 Jan 2018 20:05:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 30198 <at> debbugs.gnu.org (full text, mbox):
> From: Glenn Morris <rgm <at> gnu.org>
> Cc: Andy Moreton <andrewjmoreton <at> gmail.com>, 30198 <at> debbugs.gnu.org
> Date: Fri, 26 Jan 2018 14:54:09 -0500
>
> > I thought about that, but eventually decided it wasn't worth the risk,
> > as the problem is not urgent to fix.
>
> It's hard to see any risk
I've succeeded nonetheless.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Feb 2018 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.