summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am21
-rwxr-xr-xcheck_libmap.sh14
-rw-r--r--include/libipset/types.h2
-rw-r--r--lib/types.c2
4 files changed, 36 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index f085ca5..0032ddc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ endif
SUBDIRS = include/libipset lib src
-sparse-check:
+sparse:
$(MAKE) -C lib sparse-check
$(MAKE) -C src sparse-check
@@ -88,6 +88,9 @@ update_utils:
cd utils/ipset_list; tar xz --strip-components=1 -f /tmp/ipset-list.tar.gz
rm -f /tmp/ipset-list.tar.gz
+check_libmap:
+ @./check_libmap.sh
+
tests:
cd tests; ./runtest.sh
@@ -109,6 +112,22 @@ tarball:
tar -C /tmp -cjf ipset-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ipset-${PACKAGE_VERSION}/;
rm -Rf /tmp/ipset-${PACKAGE_VERSION};
+help:
+ @echo ' <nothing> - Compile userspace'
+ @echo ' modules - Compile kernel modules'
+ @echo ' install - Install userspace'
+ @echo ' modules_install - Install kernel modules'
+ @echo ' clean - Remove generated userspace files'
+ @echo ' modules_clean - Remove generated kernelspace files'
+ @echo ' tidy - Tidy up the whole source tree'
+ @echo ' tests - Run testsuite'
+ @echo ' sparse - Check userspace with sparse'
+ @echo ' modules_sparse - Check kernelspace with sparse'
+ @echo ' update_includes - Update userspace include files'
+ @echo ' update_utils - Update bash utilities'
+ @echo ' check_libmap - Check libipset.map for missing symbols'
+ @echo ' tarball - Create a tarball for a new release'
+
.PHONY: modules modules_instal modules_clean update_includes tests tarball
DISTCHECK_CONFIGURE_FLAGS = --with-kmod=no
diff --git a/check_libmap.sh b/check_libmap.sh
new file mode 100755
index 0000000..be2a3d3
--- /dev/null
+++ b/check_libmap.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+for file in include/libipset/*.h; do
+ case $file in
+ */ui.h) continue ;;
+ esac
+ grep ^extern $file | sed -r -e 's/\(.*//' -e 's/.* \*?//' | egrep -v '\[|\;'
+done | while read symbol; do
+ if [ -z "$symbol" ]; then
+ continue
+ fi
+ if [ -z "`grep \" $symbol\;\" lib/libipset.map`" ]; then
+ echo "Symbol $symbol is missing from libipset.map"
+ fi
+done
diff --git a/include/libipset/types.h b/include/libipset/types.h
index 333b432..aac5465 100644
--- a/include/libipset/types.h
+++ b/include/libipset/types.h
@@ -108,8 +108,6 @@ extern bool ipset_match_typename(const char *str,
const struct ipset_type *t);
extern void ipset_load_types(void);
-extern void ipset_types_init(void);
-
#ifdef TYPE_INCLUSIVE
# ifdef _INIT
# undef _init
diff --git a/lib/types.c b/lib/types.c
index e2a41ad..1520103 100644
--- a/lib/types.c
+++ b/lib/types.c
@@ -573,6 +573,8 @@ ipset_cache_fini(void)
}
}
+extern void ipset_types_init(void);
+
/**
* ipset_load_types - load known set types
*