From fb910011929a4c0feab413d25a5b06440b6ff140 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Mon, 19 Oct 2020 19:25:33 +1100 Subject: [PATCH] build-sys: Add check-lib target The referenced commits created the library infrastructure and test program to validate that the structures and macros line up with each other. The library needs to be (re)built with -DITEMTABLE_DEBUG and then the test program ran. We clean before and after so we are not testing a non-debug library or having a debug library hanging around to cause future problems. Due to test_Itemtables depending on the library, we don't need to explicitly build the library. To validate the library structure/header corrospondence run: make check-lib References: commit e616409aa497b5dc656dc7a5bd0a21adf0ee4d36 commit 92d0297e1e4d5946c5b098e37c91c7e524a0eca0 https://www.freelists.org/post/procps/keep-on-patchin,19 --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index f3aac7ef..5f2e026f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -371,9 +371,13 @@ endif BUILT_SOURCES = $(top_srcdir)/.version +check-lib: clean + $(MAKE) CFLAGS=-DITEMTABLE_DEBUG proc/test_Itemtables + $(top_builddir)/proc/test_Itemtables + $(MAKE) clean + # Test programs not used by dejagnu but run directly TESTS = \ - proc/test_Itemtables \ proc/test_pids \ proc/test_uptime \ proc/test_sysinfo \