Fix missing .exe for test filenames in Makefile (MinGW)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 1 Mar 2017 22:50:24 +0000 (01:50 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 1 Mar 2017 22:50:24 +0000 (01:50 +0300)
(fix commits ad82960, 13a17dd, ecd43ca)

* tests/Makefile.am (TESTS, check-without-test-driver): Add $(EXEEXT)
suffix to each item (test).
* tests/Makefile.am (TEST_OBJS): Reorder items (to match the that of
TESTS).
* tests/Makefile.am (check_PROGRAMS): Specify all items explicitly (so
that to have all items without the suffix as before this change).

tests/Makefile.am

index 418839f..ced8fa7 100644 (file)
@@ -12,19 +12,22 @@ AM_CPPFLAGS = \
 
 CFLAGS += $(CFLAGS_EXTRA)
 
-TESTS = test_atomic test_atomic_generalized test_stack test_malloc
-TEST_OBJS = test_atomic.o test_stack.o test_malloc.o \
-        test_atomic_generalized-test_atomic.o
+TESTS = test_atomic$(EXEEXT) test_atomic_generalized$(EXEEXT) \
+        test_stack$(EXEEXT) test_malloc$(EXEEXT)
+TEST_OBJS = test_atomic.o test_atomic_generalized-test_atomic.o \
+        test_stack.o test_malloc.o
+check_PROGRAMS = test_atomic test_atomic_generalized \
+        test_stack test_malloc
+
 if HAVE_PTHREAD_H
-TESTS += test_atomic_pthreads
+TESTS += test_atomic_pthreads$(EXEEXT)
 TEST_OBJS += test_atomic_pthreads-test_atomic.o
+check_PROGRAMS += test_atomic_pthreads
 test_atomic_pthreads_SOURCES=$(test_atomic_SOURCES)
 test_atomic_pthreads_CPPFLAGS=-DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
 test_atomic_pthreads_LDADD=$(test_atomic_LDADD)
 endif
 
-check_PROGRAMS=$(TESTS)
-
 test_atomic_SOURCES=test_atomic.c
 test_atomic_LDADD = $(THREADDLLIBS) $(top_builddir)/src/libatomic_ops.la
 
@@ -47,11 +50,11 @@ test_malloc_LDADD = $(THREADDLLIBS) \
 .PHONY: check-without-test-driver
 check-without-test-driver: $(TESTS)
        @echo "The following will print some 'Missing ...' messages"
-       ./test_atomic
-       ./test_atomic_generalized
-       ./test_stack
-       ./test_malloc
-       test ! -f test_atomic_pthreads || ./test_atomic_pthreads
+       ./test_atomic$(EXEEXT)
+       ./test_atomic_generalized$(EXEEXT)
+       ./test_stack$(EXEEXT)
+       ./test_malloc$(EXEEXT)
+       test ! -f test_atomic_pthreads$(EXEEXT) || ./test_atomic_pthreads$(EXEEXT)
 
 test_atomic_include.h: test_atomic_include.template
        mkdir -p `dirname $@`