summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-20 17:23:21 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-03-20 17:24:12 +0100
commit2001132f4a1ab2ad02f31c4a7c4cf9a5d803ed54 (patch)
tree5eb6df2e40f3dd2530d3bd0fa87b831e9d82373f /Makefile
parent46406d1d2144b8515782e346bdbf241533b2e75a (diff)
Add configure option to build tests only on request (#940)
Option: ./configure --disable-test build test programs (default=yes) Thanks for the patch(es) to @michaelbaeuerle. I added `make test` to be able to build the test programs from the FLTK root directory if FLTK was configured with --disable-test.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c02de0972..41e1121f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Top-level Makefile for the Fast Light Tool Kit (FLTK).
#
-# Copyright 1998-2023 by Bill Spitzak and others.
+# Copyright 1998-2024 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
include makeinclude
-DIRS = $(IMAGEDIRS) $(LIBDECORDIR) src $(CAIRODIR) $(FLUIDDIR) fltk-options test \
+DIRS = $(IMAGEDIRS) $(LIBDECORDIR) src $(CAIRODIR) $(FLUIDDIR) fltk-options $(TESTDIR) \
documentation
all: makeinclude fltk-config
@@ -25,6 +25,11 @@ all: makeinclude fltk-config
(cd $$dir; $(MAKE) $(MFLAGS)) || exit 1;\
done
+# Build test programs (and 'all') if FLTK was configured with '--disable-test'
+test: all
+ echo "=== making test ===";\
+ (cd test; $(MAKE) $(MFLAGS)) || exit 1
+
install: makeinclude
-mkdir -p $(DESTDIR)$(bindir)
$(RM) $(DESTDIR)$(bindir)/fltk-config