]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
build: restore build order of modules
authorJan Engelhardt <jengelh@medozas.de>
Sun, 18 Sep 2011 13:06:05 +0000 (15:06 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Mon, 19 Sep 2011 11:42:32 +0000 (13:42 +0200)
iptables(exe) requires libext.a, but extensions/ require libxtables.la
(in iptables/). This circular dependency does not work out, so
separate libxtables into its own directory and put it in front.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Makefile.am
configure.ac
extensions/GNUmakefile.in
iptables/Makefile.am
libxtables/Makefile.am [new file with mode: 0644]
libxtables/xtables.c [moved from iptables/xtables.c with 100% similarity]
libxtables/xtoptions.c [moved from iptables/xtoptions.c with 100% similarity]

index 9167e8e3866615cb7e77b4ce4b93547e90e38ced..4eb63ebe173bff839ad9a5f35cd56ae56a1a49e0 100644 (file)
@@ -3,7 +3,7 @@
 ACLOCAL_AMFLAGS  = -I m4
 AUTOMAKE_OPTIONS = foreign subdir-objects
 
-SUBDIRS          = libiptc iptables
+SUBDIRS          = libiptc libxtables
 if ENABLE_DEVEL
 SUBDIRS         += include
 endif
@@ -13,7 +13,10 @@ endif
 if HAVE_LIBNFNETLINK
 SUBDIRS         += utils
 endif
+# Depends on libxtables:
 SUBDIRS         += extensions
+# Depends on extensions/libext.a:
+SUBDIRS         += iptables
 
 .PHONY: tarball
 tarball:
index 22b7bf1568e5ee68b009a0814587432bd18f25f1..8afba8c119c8ebeba5a8db9e8ed40a0bcd575864 100644 (file)
@@ -112,6 +112,6 @@ AC_SUBST([libxtables_vmajor])
 AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile
        iptables/Makefile iptables/xtables.pc
        libipq/Makefile libipq/libipq.pc
-       libiptc/Makefile libiptc/libiptc.pc utils/Makefile
+       libiptc/Makefile libiptc/libiptc.pc libxtables/Makefile utils/Makefile
        include/xtables.h include/iptables/internal.h])
 AC_OUTPUT
index 60f28c0ccdcc5a226809d0c5ef06bca3fe54c1c4..221c2c91eb54b59bcef357b063b4e358635d6cea 100644 (file)
@@ -72,10 +72,10 @@ all: ${targets} check
 
 check: ${targets}
        @echo "  CHECK    unknown symbols in .so files"; \
-       . ../iptables/libxtables.la; \
+       . ../libxtables/libxtables.la; \
        for i in "" lib*.so; do \
                [ -z "$$i" ] && continue; \
-               LD_PRELOAD="$$dlname" LD_LIBRARY_PATH=../iptables/.libs \
+               LD_PRELOAD="$$dlname" LD_LIBRARY_PATH=../libxtables/.libs \
                        ldd -r $$i 2>&1 >/dev/null; \
        done;
 
index af620f76eda4652301c9119200f37ecd9b0e5ed5..bdd4da11db21c0f1602576f27776db9e26694f68 100644 (file)
@@ -3,22 +3,6 @@
 AM_CFLAGS        = ${regular_CFLAGS}
 AM_CPPFLAGS      = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS}
 
-lib_LTLIBRARIES       = libxtables.la
-libxtables_la_SOURCES = xtables.c xtoptions.c
-libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
-libxtables_la_LIBADD  =
-if ENABLE_STATIC
-# With --enable-static, shipped extensions are linked into the main executable,
-# so we need all the LIBADDs here too
-libxtables_la_LIBADD += -lm
-endif
-if ENABLE_SHARED
-libxtables_la_CFLAGS  = ${AM_CFLAGS}
-libxtables_la_LIBADD += -ldl
-else
-libxtables_la_CFLAGS  = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
-endif
-
 xtables_multi_SOURCES  = xtables-multi.c iptables-xml.c
 xtables_multi_CFLAGS   = ${AM_CFLAGS}
 xtables_multi_LDADD    = ../extensions/libext.a
@@ -38,7 +22,7 @@ xtables_multi_CFLAGS  += -DENABLE_IPV6
 xtables_multi_LDADD   += ../libiptc/libip6tc.la ../extensions/libext6.a
 endif
 xtables_multi_SOURCES += xshared.c
-xtables_multi_LDADD   += libxtables.la -lm
+xtables_multi_LDADD   += ../libxtables/libxtables.la -lm
 
 sbin_PROGRAMS    = xtables-multi
 man_MANS         = iptables.8 iptables-restore.8 iptables-save.8 \
diff --git a/libxtables/Makefile.am b/libxtables/Makefile.am
new file mode 100644 (file)
index 0000000..c5795fe
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- Makefile -*-
+
+AM_CFLAGS   = ${regular_CFLAGS}
+AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include -I${top_srcdir}/iptables ${kinclude_CPPFLAGS}
+
+lib_LTLIBRARIES       = libxtables.la
+libxtables_la_SOURCES = xtables.c xtoptions.c
+libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
+libxtables_la_LIBADD  =
+if ENABLE_STATIC
+# With --enable-static, shipped extensions are linked into the main executable,
+# so we need all the LIBADDs here too
+libxtables_la_LIBADD += -lm
+endif
+if ENABLE_SHARED
+libxtables_la_CFLAGS  = ${AM_CFLAGS}
+libxtables_la_LIBADD += -ldl
+else
+libxtables_la_CFLAGS  = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
+endif
similarity index 100%
rename from iptables/xtables.c
rename to libxtables/xtables.c
similarity index 100%
rename from iptables/xtoptions.c
rename to libxtables/xtoptions.c