aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorPhilipp Stephani2017-06-12 16:09:37 +0200
committerPhilipp Stephani2017-06-12 16:09:37 +0200
commitc90a97adc49e844d884a4422e99570526fd92485 (patch)
tree8587d28765a009f2c049931181e9dd4ff026efde /test/data
parent909dfaf3257e5e2de48a0a51bf9d42517a393fb0 (diff)
downloademacs-c90a97adc49e844d884a4422e99570526fd92485.tar.gz
emacs-c90a97adc49e844d884a4422e99570526fd92485.zip
Use Autoconf to generate the test module Makefile
This makes it easier to pass compilation flags around. * configure.ac: Also build test module Makefile. * test/data/emacs-module/Makefile.in: New makefile template. * test/Makefile.in ($(test_module)): No longer necessary to pass @MODULES_SUFFIX@ around. * .gitignore: Test module Makefile can now be ignored.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/emacs-module/Makefile.in (renamed from test/data/emacs-module/Makefile)25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/data/emacs-module/Makefile b/test/data/emacs-module/Makefile.in
index bfeddb0472f..427d1aaa07c 100644
--- a/test/data/emacs-module/Makefile
+++ b/test/data/emacs-module/Makefile.in
@@ -1,3 +1,5 @@
1### @configure_input@
2
1# Test GNU Emacs modules. 3# Test GNU Emacs modules.
2 4
3# Copyright 2015-2017 Free Software Foundation, Inc. 5# Copyright 2015-2017 Free Software Foundation, Inc.
@@ -17,25 +19,28 @@
17# You should have received a copy of the GNU General Public License 19# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 20# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 21
20ROOT = ../../.. 22SHELL = @SHELL@
21 23
22CC = gcc 24top_srcdir = @top_srcdir@
23LD = gcc 25VPATH = $(srcdir)
24LDFLAGS = 26CC = @CC@
27CFLAGS = @CFLAGS@
28CPPFLAGS = @CPPFLAGS@
29SO = @MODULES_SUFFIX@
25 30
26# On MS-Windows, say "make SO=.dll" to build the module
27SO = .so
28# -fPIC is a no-op on Windows, but causes a compiler warning 31# -fPIC is a no-op on Windows, but causes a compiler warning
29ifeq ($(SO),.dll) 32ifeq ($(SO),.dll)
30CFLAGS = -std=c11 -ggdb3 -Wall 33FPIC_CFLAGS =
31else 34else
32CFLAGS = -std=c11 -ggdb3 -Wall -fPIC 35FPIC_CFLAGS = -fPIC
33endif 36endif
34 37
35all: mod-test$(SO) 38all: mod-test$(SO)
36 39
37%$(SO): %.o 40%$(SO): %.o
38 $(LD) -shared $(LDFLAGS) -o $@ $< 41 $(CC) -shared $(LDFLAGS) -o $@ $<
39 42
40%.o: %.c 43%.o: %.c
41 $(CC) $(CFLAGS) -I$(ROOT)/src -c $< 44 $(CC) $(CPPFLAGS) $(CFLAGS) $(FPIC_CFLAGS) -I$(top_srcdir)/src -c -o $@ $<
45
46%.o: $(srcdir)/emacs-module.[ch]