summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-06-24 09:49:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-06-24 09:49:44 (GMT)
commitee35adccec058a5a8cc62f5030b9a925168236d6 (patch) (side-by-side diff)
treeed66fbf673674358e2159e4cc35560328952f562
parent12304127b52650588877f00b0c4b32dae083e852 (diff)
downloadgrecs-ee35adccec058a5a8cc62f5030b9a925168236d6.tar.gz
grecs-ee35adccec058a5a8cc62f5030b9a925168236d6.tar.bz2
getopt.m4: add macro to insert a CPP directive in all diversions
* build-aux/getopt.m4 (CPP): New macro
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--build-aux/getopt.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/build-aux/getopt.m4 b/build-aux/getopt.m4
index 85e930e..2398932 100644
--- a/build-aux/getopt.m4
+++ b/build-aux/getopt.m4
@@ -208,6 +208,26 @@ __getopt_ifempty(__getopt_quote(__GETOPT_SHORT_TAG),__getopt_dquote(__getopt_dqu
popdef([<__GETOPT_KEY>])
>])
+dnl CPP(statement)
+dnl --------------
+dnl Inserts a CPP statement to all diversions
+dnl
+define([<CPP>],[<WITH_DIVERSION(__DIV_OPTKEYS__,[<dnl
+$1
+>])
+WITH_DIVERSION(__DIV_OPTDECL__,[<dnl
+$1
+>])
+WITH_DIVERSION(__DIV_HELPDECL__,[<dnl
+$1
+>])
+WITH_DIVERSION(__DIV_SWITCH__,[<dnl
+$1
+>])
+WITH_DIVERSION(__DIV_STATIC__,[<dnl
+$1
+>])>])
+
dnl OPTION(long-opt, short-opt, [arg], [descr])
dnl -------------------------------------------
dnl Introduce a command line option. Arguments:

Return to:

Send suggestions and report system problems to the System administrator.