Commit 5884e2f2 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

build: Turn vrt_test into a compile-time check

Instead of generating a test script that performs the compilation, we
can give automake a no-op linker command. With that vrt.h is verified
with a simple `make` or `make all` invocation, before `make check` even
kicks in.

Doing it this way also gives applicable warnings like strict-prototypes
a chance to fail earlier.

Refs #3667
parent 5343d84d
......@@ -157,15 +157,15 @@ CLEANFILES = \
_vrt_test \
_vrt.c
TESTS = vbm_test vrt_test
noinst_PROGRAMS = vbm_test
noinst_PROGRAMS = vbm_test vrt_test
vbm_test_SOURCES = vbm_test.c vbm.h
_vrt.c: Makefile.am vdef.h vrt.h
vrt_test.c: vdef.h vrt.h
cat $(srcdir)/vdef.h $(srcdir)/vrt.h > $@
vrt_test: _vrt.c
echo "exec ${CC} -c -o _vrt_test _vrt.c" > $@
chmod +x $@
vrt_test_BUILT_SOURCES = vrt_test.c
vrt_test_CFLAGS = -c
vrt_test_LINK = :
TESTS = vbm_test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment