From: Jeremy Sowden <jeremy@azazel.net>
To: Duncan Roe <duncan_roe@optusnet.com.au>
Cc: pablo@netfilter.org, netfilter-devel@vger.kernel.org
Subject: libnetfilter_queue: automake portability warning
Date: Fri, 27 Aug 2021 22:09:58 +0100 [thread overview]
Message-ID: <YSlUpg5zfcwNiS50@azazel.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]
Running autogen.sh gives the following output when it gets to
doxygen/Makefile.am:
doxygen/Makefile.am:3: warning: shell find $(top_srcdir: non-POSIX variable name
doxygen/Makefile.am:3: (probably a GNU make extension)
Automake doesn't understand the GNU make $(shell ...) function and tries
to interpret it as an Automake variable. The Automake people would
probably say we shouldn't do that 'cause it's not portable:
https://www.gnu.org/software/automake/manual/automake.html#Wildcards
However, if we accept that we are targetting GNU make, but we want to
get rid of the warning, I believe there are two ways to do so. We can
tell Automake not to warn about non-portable constructions:
diff --git a/configure.ac b/configure.ac
index 4721eebbab1f..7cd34d079e67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([-Wall foreign subdir-objects
+AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects
tar-pax no-dist-gzip dist-bzip2 1.6])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
On the other hand, if we want to suppress the warning for just this one
GNU-ism, we can hide it from automake:
diff --git a/configure.ac b/configure.ac
index 4721eebbab1f..b2b54d3168ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,19 @@ AS_IF([test "x$DOXYGEN" = x], [
with_doxygen=no
])
])
+#
+# Putting $(shell ... ) directly into the doyxgen Makefile.am confuses automake,
+# which tries to interpret it as an automake variable:
+#
+# doxygen/Makefile.am:3: warning: shell find $(top_srcdir: non-POSIX variable name
+# doxygen/Makefile.am:3: (probably a GNU make extension)
+#
+# Instead, we use autoconf to substitute it into place after automake has run.
+#
+AS_IF([test "x$with_doxygen" != no], [
+ AC_SUBST([DOC_SRCS], ['$(shell find $(top_srcdir)/src -name '"'"'*.c'"'"')'])
+])
+
AC_OUTPUT
echo "
diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
index f38009b24114..6ed30e21ff75 100644
--- a/doxygen/Makefile.am
+++ b/doxygen/Makefile.am
@@ -1,6 +1,6 @@
if HAVE_DOXYGEN
-doc_srcs = $(shell find $(top_srcdir)/src -name '*.c')
+doc_srcs = @DOC_SRCS@
doxyfile.stamp: $(doc_srcs) Makefile.am
rm -rf html man
J.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2021-08-27 21:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 21:09 Jeremy Sowden [this message]
2021-08-28 3:31 ` libnetfilter_queue: automake portability warning Duncan Roe
2021-08-28 13:39 ` Jan Engelhardt
2021-08-28 19:45 ` Duncan Roe
2021-08-28 20:27 ` Pablo Neira Ayuso
2021-08-29 4:01 ` Duncan Roe
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=YSlUpg5zfcwNiS50@azazel.net \
--to=jeremy@azazel.net \
--cc=duncan_roe@optusnet.com.au \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.