From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 6/8] build: directly use config.h in internal.h
Date: Fri, 4 Feb 2011 14:08:52 +0100 [thread overview]
Message-ID: <1296824935-4606-7-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1296824935-4606-1-git-send-email-jengelh@medozas.de>
This avoids the extra indirection via the .h.in file.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
.gitignore | 1 -
Makefile.am | 3 +--
configure.ac | 2 +-
include/iptables/internal.h | 15 +++++++++++++++
include/iptables/internal.h.in | 13 -------------
5 files changed, 17 insertions(+), 17 deletions(-)
create mode 100644 include/iptables/internal.h
delete mode 100644 include/iptables/internal.h.in
diff --git a/.gitignore b/.gitignore
index e5d3099..7d0df25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,7 +18,6 @@ Makefile.in
/extensions/targets?.man
/include/xtables.h
-/include/iptables/internal.h
/aclocal.m4
/autom4te*.cache
diff --git a/Makefile.am b/Makefile.am
index 7f0eb2f..cfccbf2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -89,8 +89,7 @@ tarball:
tar -C /tmp -cjf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/;
rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION};
-config.status: extensions/GNUmakefile.in \
- include/xtables.h.in include/iptables/internal.h.in
+config.status: extensions/GNUmakefile.in include/xtables.h.in
# Using if..fi avoids an ugly "error (ignored)" message :)
install-exec-hook:
diff --git a/configure.ac b/configure.ac
index eb447e0..94d5ab2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,5 +111,5 @@ AC_SUBST([libxtables_vmajor])
AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile
libipq/Makefile utils/Makefile
- include/xtables.h include/iptables/internal.h libiptc.pc xtables.pc])
+ include/xtables.h libiptc.pc xtables.pc])
AC_OUTPUT
diff --git a/include/iptables/internal.h b/include/iptables/internal.h
new file mode 100644
index 0000000..531fe4f
--- /dev/null
+++ b/include/iptables/internal.h
@@ -0,0 +1,15 @@
+#ifndef IPTABLES_INTERNAL_H
+#define IPTABLES_INTERNAL_H 1
+
+#include "config.h"
+
+#define IPTABLES_VERSION PACKAGE_VERSION
+
+/**
+ * Program's own name and version.
+ */
+extern const char *program_name, *program_version;
+
+extern int line;
+
+#endif /* IPTABLES_INTERNAL_H */
diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in
deleted file mode 100644
index 8568e58..0000000
--- a/include/iptables/internal.h.in
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef IPTABLES_INTERNAL_H
-#define IPTABLES_INTERNAL_H 1
-
-#define IPTABLES_VERSION "@PACKAGE_VERSION@"
-
-/**
- * Program's own name and version.
- */
-extern const char *program_name, *program_version;
-
-extern int line;
-
-#endif /* IPTABLES_INTERNAL_H */
--
1.7.1
next prev parent reply other threads:[~2011-02-04 13:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 13:08 iptables: mainloop cleanup, symbol vis+versioning Jan Engelhardt
2011-02-04 13:08 ` [PATCH 1/8] iptables: reduce indentation of parse loop (1/3) Jan Engelhardt
2011-02-04 13:08 ` [PATCH 2/8] iptables: reduce indentation of parse loop (2/3) Jan Engelhardt
2011-02-04 13:08 ` [PATCH 3/8] iptables: use variable as shortcut in parse loop Jan Engelhardt
2011-02-04 13:08 ` [PATCH 4/8] iptables: reduce indentation of parse loop (3/3) Jan Engelhardt
2011-02-04 13:08 ` [PATCH 5/8] iptables: fix error message for unknown options Jan Engelhardt
2011-02-04 13:08 ` Jan Engelhardt [this message]
2011-02-04 13:08 ` [PATCH 7/8] libxtables: symbol visibility Jan Engelhardt
2011-02-04 13:13 ` Patrick McHardy
2011-02-04 13:22 ` Jan Engelhardt
2011-02-04 13:30 ` Patrick McHardy
2011-02-04 13:08 ` [PATCH 8/8] libxtables: symbol versioning Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296824935-4606-7-git-send-email-jengelh@medozas.de \
--to=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).