test: Add a make install target for the tests
This makes it more convenient to compile them alongside SDL, install them in an optional package and use them as smoke-tests or diagnostic tools. The default installation directory is taken from GNOME's installed-tests, which seems as good a convention as any other: https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Sam Lantinga
parent
76a7b629bf
commit
38ef678990
@@ -2,6 +2,15 @@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
includedir = @includedir@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
|
||||
CC = @CC@
|
||||
EXE = @EXE@
|
||||
CFLAGS = @CFLAGS@ -g
|
||||
@@ -81,6 +90,12 @@ TARGETS = \
|
||||
|
||||
all: Makefile $(TARGETS) copydatafiles
|
||||
|
||||
installedtestsdir = $(libexecdir)/installed-tests/SDL2
|
||||
|
||||
install: all
|
||||
install -D -t $(DESTDIR)$(installedtestsdir) $(TARGETS)
|
||||
install -m644 -D -t $(DESTDIR)$(installedtestsdir) $(DATA)
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in
|
||||
$(SHELL) config.status $@
|
||||
|
||||
|
||||
Reference in New Issue
Block a user