[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e08f241: Fix emacs-module-tests to work out of buil
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master e08f241: Fix emacs-module-tests to work out of build tree |
Date: |
Fri, 26 Jan 2018 05:11:25 -0500 (EST) |
branch: master
commit e08f241658667a328bade89ab479fc5f7389bb9b
Author: Andy Moreton <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix emacs-module-tests to work out of build tree
* 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.
---
test/Makefile.in | 5 +++--
test/src/emacs-module-tests.el | 3 +--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 3f4f8e7..a85d491 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -120,7 +120,7 @@ emacs = EMACSLOADPATH= LC_ALL=$(TEST_LOCALE) \
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
@@ -223,12 +223,13 @@ else
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
+ $(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 d9406a9..85d6305 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -25,8 +25,7 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e08f241: Fix emacs-module-tests to work out of build tree,
Eli Zaretskii <=