netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libnfnetlink: build system cleanup
@ 2010-10-30 22:07 Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 1/9] build: use autoconf-suggested naming of files Jan Engelhardt
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel


The following changes since commit 54c8cf1853e97dcaa974c9f44297f94619f1d880:

  iftable: fix wrong handler unregistration on error (2010-09-30 13:23:07 +0200)

are available in the git repository at:
  git://dev.medozas.de/libnfnetlink master

Jan Engelhardt (9):
      build: use autoconf-suggested naming of files
      build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE
      build: avoid use of deprecated INCLUDES
      build: use simpler autoreconf in autogen
      build: use AC_CONFIG_MACRO_DIR as directed
      build: run AC_CANONICAL_HOST only
      build: remove statements without effect
      build: remove -fPIC flag
      Add .gitignore files

 .gitignore                   |   19 +++++++++++++++++++
 Make_global.am               |    2 +-
 Makefile.am                  |    6 +-----
 autogen.sh                   |   20 +++-----------------
 configure.in => configure.ac |    8 ++++----
 m4/.gitignore                |    2 ++
 src/Makefile.am              |    3 +--
 utils/.gitignore             |    1 +
 8 files changed, 32 insertions(+), 29 deletions(-)
 create mode 100644 .gitignore
 rename configure.in => configure.ac (77%)
 create mode 100644 m4/.gitignore
 create mode 100644 utils/.gitignore

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/9] build: use autoconf-suggested naming of files
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 2/9] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE Jan Engelhardt
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 configure.ac |   25 +++++++++++++++++++++++++
 configure.in |   25 -------------------------
 2 files changed, 25 insertions(+), 25 deletions(-)
 create mode 100644 configure.ac
 delete mode 100644 configure.in

diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..47f3551
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,25 @@
+dnl Process this file with autoconf to create configure.
+
+AC_INIT(libnfnetlink, 1.0.0)
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE
+
+AC_PROG_CC
+AC_EXEEXT
+AM_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+
+case $target in 
+*-*-linux*) ;;
+*) AC_MSG_ERROR([Linux only, dude!]);;
+esac
+
+
+dnl--------------------------------
+dnl--------------------------------
+
+
+dnl Output the makefile
+AC_OUTPUT(Makefile src/Makefile include/Makefile include/libnfnetlink/Makefile utils/Makefile libnfnetlink.pc)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 47f3551..0000000
--- a/configure.in
+++ /dev/null
@@ -1,25 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-AC_INIT(libnfnetlink, 1.0.0)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE
-
-AC_PROG_CC
-AC_EXEEXT
-AM_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-
-case $target in 
-*-*-linux*) ;;
-*) AC_MSG_ERROR([Linux only, dude!]);;
-esac
-
-
-dnl--------------------------------
-dnl--------------------------------
-
-
-dnl Output the makefile
-AC_OUTPUT(Makefile src/Makefile include/Makefile include/libnfnetlink/Makefile utils/Makefile libnfnetlink.pc)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/9] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 1/9] build: use autoconf-suggested naming of files Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 3/9] build: avoid use of deprecated INCLUDES Jan Engelhardt
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

automake options also need to definitely go into configure.ac,
otherwise they only apply to a single directory.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 Makefile.am  |    2 --
 configure.ac |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 91e2670..4c4400a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,5 @@
 include $(top_srcdir)/Make_global.am
 
-AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
-
 EXTRA_DIST = $(man_MANS)
 
 SUBDIRS = src include utils
diff --git a/configure.ac b/configure.ac
index 47f3551..cc86fe7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_INIT(libnfnetlink, 1.0.0)
 
 AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects dist-bzip2 1.6])
 
 AC_PROG_CC
 AC_EXEEXT
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/9] build: avoid use of deprecated INCLUDES
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 1/9] build: use autoconf-suggested naming of files Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 2/9] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 4/9] build: use simpler autoreconf in autogen Jan Engelhardt
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Make_global.am:7: "INCLUDES" is the old name for "AM_CPPFLAGS" (or "*_CPPFLAGS")

Also remove unused $(all_includes).

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 Make_global.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Make_global.am b/Make_global.am
index b62b712..8b406a9 100644
--- a/Make_global.am
+++ b/Make_global.am
@@ -4,4 +4,4 @@
 # http://sources.redhat.com/autobook/autobook/autobook_91.html
 LIBVERSION=2:0:2
 
-INCLUDES=$(all_includes) -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/9] build: use simpler autoreconf in autogen
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (2 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 3/9] build: avoid use of deprecated INCLUDES Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 5/9] build: use AC_CONFIG_MACRO_DIR as directed Jan Engelhardt
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Note: the use of -i seems required, otherwise autoreconf barfs about
missing tools (depcomp, etc.). Since they are provided in the tarballs
as files anyway rather than like previously as symlinks, I do not see
a problem using -i.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 autogen.sh |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index c167563..de861fc 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 include ()
 {
@@ -34,20 +34,6 @@ include ()
     fi
 }
 
-run ()
-{
-    echo "running: $*"
-    eval $*
-
-    if test $? != 0 ; then
-	echo "error: while running '$*'"
-	exit 1
-    fi
-}
-
 [ "x$1" = "xdistrib" ] && include
-run aclocal
-#run autoheader
-run libtoolize -f
-run automake -a
-run autoconf
+autoreconf -fi
+rm -Rf autom4te.cache
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/9] build: use AC_CONFIG_MACRO_DIR as directed
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (3 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 4/9] build: use simpler autoreconf in autogen Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 6/9] build: run AC_CANONICAL_HOST only Jan Engelhardt
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

libtoolize: Consider adding "AC_CONFIG_MACRO_DIR([m4])" to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding "-I m4" to ACLOCAL_AMFLAGS in Makefile.am.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 Makefile.am  |    2 ++
 configure.ac |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4c4400a..95d1df8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
 include $(top_srcdir)/Make_global.am
 
+ACLOCAL_AMFLAGS = -I m4
+
 EXTRA_DIST = $(man_MANS)
 
 SUBDIRS = src include utils
diff --git a/configure.ac b/configure.ac
index cc86fe7..b05c7f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to create configure.
 
 AC_INIT(libnfnetlink, 1.0.0)
-
+AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_SYSTEM
 
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects dist-bzip2 1.6])
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/9] build: run AC_CANONICAL_HOST only
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (4 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 5/9] build: use AC_CONFIG_MACRO_DIR as directed Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 7/9] build: remove statements without effect Jan Engelhardt
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

There is no need to call AC_CANONICAL_SYSTEM when only
AC_CANONICAL_HOST is needed. Also, checking for $target is factually
incorrect, since we do not produce object code like a compiler. Use
$host, which specifies the triple/quadruple where the compiled program
is supposed to run.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b05c7f3..91fd6d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_INIT(libnfnetlink, 1.0.0)
 AC_CONFIG_MACRO_DIR([m4])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects dist-bzip2 1.6])
 
@@ -11,7 +11,7 @@ AC_EXEEXT
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
-case $target in 
+case "$host" in 
 *-*-linux*) ;;
 *) AC_MSG_ERROR([Linux only, dude!]);;
 esac
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 7/9] build: remove statements without effect
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (5 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 6/9] build: run AC_CANONICAL_HOST only Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 8/9] build: remove -fPIC flag Jan Engelhardt
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 Makefile.am |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 95d1df8..d38da7d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,9 +12,5 @@ man_MANS = #nfnetlink.3
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnfnetlink.pc
 
-$(OBJECTS): libtool
-libtool: $(LIBTOOL_DEPS)
-	$(SHELL) ./config.status --recheck
-
 dist-hook:
 	rm -rf `find $(distdir)/debian -name .svn`
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 8/9] build: remove -fPIC flag
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (6 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 7/9] build: remove statements without effect Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-10-30 22:07 ` [PATCH 9/9] Add .gitignore files Jan Engelhardt
  2010-11-01 21:28 ` libnfnetlink: build system cleanup Pablo Neira Ayuso
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

libtool automatically adds PIC flags as needed.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 src/Makefile.am |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cc400b9..e6bc7c4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/Make_global.am
 
-AM_CFLAGS=-fPIC -Wall
-LIBS=
+AM_CFLAGS = -Wall
 
 lib_LTLIBRARIES = libnfnetlink.la
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 9/9] Add .gitignore files
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (7 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 8/9] build: remove -fPIC flag Jan Engelhardt
@ 2010-10-30 22:07 ` Jan Engelhardt
  2010-11-01 21:28 ` libnfnetlink: build system cleanup Pablo Neira Ayuso
  9 siblings, 0 replies; 11+ messages in thread
From: Jan Engelhardt @ 2010-10-30 22:07 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 .gitignore       |   19 +++++++++++++++++++
 m4/.gitignore    |    2 ++
 utils/.gitignore |    1 +
 3 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 m4/.gitignore
 create mode 100644 utils/.gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f5ca1f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+.deps
+.libs
+Makefile
+Makefile.in
+*.o
+*.la
+*.lo
+
+/aclocal.m4
+/autom4te.cache
+/config.*
+/configure
+/depcomp
+/install-sh
+/libtool
+/ltmain.sh
+/missing
+
+/*.pc
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..64d9bbc
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,2 @@
+/libtool.m4
+/lt*.m4
diff --git a/utils/.gitignore b/utils/.gitignore
new file mode 100644
index 0000000..ddd4de3
--- /dev/null
+++ b/utils/.gitignore
@@ -0,0 +1 @@
+/iftest
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: libnfnetlink: build system cleanup
  2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
                   ` (8 preceding siblings ...)
  2010-10-30 22:07 ` [PATCH 9/9] Add .gitignore files Jan Engelhardt
@ 2010-11-01 21:28 ` Pablo Neira Ayuso
  9 siblings, 0 replies; 11+ messages in thread
From: Pablo Neira Ayuso @ 2010-11-01 21:28 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

On 31/10/10 00:07, Jan Engelhardt wrote:
> The following changes since commit 54c8cf1853e97dcaa974c9f44297f94619f1d880:
> 
>   iftable: fix wrong handler unregistration on error (2010-09-30 13:23:07 +0200)
> 
> are available in the git repository at:
>   git://dev.medozas.de/libnfnetlink master

pulled and pushed, thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-11-01 21:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-30 22:07 libnfnetlink: build system cleanup Jan Engelhardt
2010-10-30 22:07 ` [PATCH 1/9] build: use autoconf-suggested naming of files Jan Engelhardt
2010-10-30 22:07 ` [PATCH 2/9] build: use modern call syntax for AC_INIT, AM_INIT_AUTOMAKE Jan Engelhardt
2010-10-30 22:07 ` [PATCH 3/9] build: avoid use of deprecated INCLUDES Jan Engelhardt
2010-10-30 22:07 ` [PATCH 4/9] build: use simpler autoreconf in autogen Jan Engelhardt
2010-10-30 22:07 ` [PATCH 5/9] build: use AC_CONFIG_MACRO_DIR as directed Jan Engelhardt
2010-10-30 22:07 ` [PATCH 6/9] build: run AC_CANONICAL_HOST only Jan Engelhardt
2010-10-30 22:07 ` [PATCH 7/9] build: remove statements without effect Jan Engelhardt
2010-10-30 22:07 ` [PATCH 8/9] build: remove -fPIC flag Jan Engelhardt
2010-10-30 22:07 ` [PATCH 9/9] Add .gitignore files Jan Engelhardt
2010-11-01 21:28 ` libnfnetlink: build system cleanup Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).