m4_pattern_forbid documentation

Matěj Týč <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
Hello,
I attach the suggestion of autoconf m4sugar-related documentation
improvement.
Specifically, the patch adds a more concrete description of what the
m4_pattern_forbid thingy that pretends it is a macro accepts as an
argument.
BR,
Matej
m4_pattern_forbid-doc.patch (text/x-patch, 1.6 KB)
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d9e833d..3d3a24b 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13379,6 +13379,15 @@ the authors of this documentation: input, such as macros, should be
 documented by @samp{dnl} comments; reserving @samp{#}-comments to
 document the output).
 
+The regular expression family the output is checked against is a Perl one.
+Therefore, if you define your own macros that begin with @samp{M_} and
+are composed from capital letters and underscores,
+you want to specify @code{m4_pattern_forbid([^M_[A-Z_]+])}
+Although @samp{^} is a Perl regexp for beginning of lines, due to the
+output post-processing performed by @command{autom4te}, it will have
+the same effect as the regular expression @samp{\b},
+that matches beginning of words.
+
 As an example of a common use of this macro, consider what happens in
 packages that want to use the @command{pkg-config} script via the
 third-party @code{PKG_CHECK_MODULES} macro.  By default, if a developer
@@ -13386,7 +13395,7 @@ checks out the development tree but has not yet installed the pkg-config
 macros locally, they can manage to successfully run @command{autoconf}
 on the package, but the resulting @file{configure} file will likely
 result in a confusing shell message about a syntax error on the line
-mentioning the unexpanded PKG_CHECK_MODULES macro.  On the other hand,
+mentioning the unexpanded @code{PKG_CHECK_MODULES} macro.  On the other hand,
 if @file{configure.ac} includes @code{m4_pattern_forbid([^PKG_])}, the
 missing pkg-config macros will be detected immediately without allowing
 @command{autoconf} to succeed.
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCAAGBQJVMCLqAAoJEGB1JPhU/ZBfvaEP/2E7rB8+vknJZT+1cUjmC+w0
I23zjgI6Jwh+2cUpR/jUPMrU3Q/BMmFmD/YxYzHZTI/ryPw27+OlNMzkkLltbeMD
Mfh5V3ESVwNlEOIj6rzlBLGtRCdYFnpHq5sDyoJlsDZtgIT1YAEMCoO8e2blBOnu
BcZ2sjvqNsxNPPq4KngUj7e+4Z99zaQpjE0Y+IrFUmFQ8bXAmFo/jdh7qTUK52Uo
5Tr8MO0RIaF5M4/NkJY28DIUV7/gHQhdCEr29fbWc6eOi7CT7yv9P+/BioiRmK5u
t/xMFLjoIWIf+puG9XwfDEvOLxozbx2bg4kWGJTAL6s1l43P4Ybupbv4qCDpZAD3
Q/PijeaL3rg1m/OvEv7GylSBdD5MQcLuUhsmjJQ78e7w2+XyfQ4s67LzeUy1MJgr
c9IYOZHvmjzqvhxPveoNu0A8tDYHRZYAo6TK5GnaBbsrCK2j1W9ym1TOQqA66jWl
u1RPLffeSYrpiX/KgyroUx9YLf6d5wGqRo5m5qiak81MgOp+EVQFJuo/tibLQ33p
itUNnDEdtd8EErbNPGVwv06gDN7cm/u0mOfO5weun273joO6huXM73vymZqBHQ7d
5jHn+Dl7oKfJRjCfk8kxI3F5DoQEs2WdlrQl9qWX2B1AkoscKutMBzyKPCx0z/T8
PtfKLPPukpVNVMiGxDUt
=kz1a
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.