]> granicus.if.org Git - procps-ng/commitdiff
build-sys: Add check-lib target
authorCraig Small <csmall@dropbear.xyz>
Mon, 19 Oct 2020 08:25:33 +0000 (19:25 +1100)
committerCraig Small <csmall@dropbear.xyz>
Mon, 19 Oct 2020 08:25:33 +0000 (19:25 +1100)
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

index f3aac7efa71552f9915d11fc59e7ccb164e6094f..5f2e026ffa5f6e0865229f22fb31804585315219 100644 (file)
@@ -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 \