summaryrefslogtreecommitdiffstats
path: root/doc/mkdefsinc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-04-05 15:15:28 +0200
committerWerner Koch <wk@gnupg.org>2016-04-05 15:15:28 +0200
commit4dc4fb1c14b3096bb1cdc5923c0d1eb419036805 (patch)
tree6f39984f42671d22915513750c2dd6bd126bce51 /doc/mkdefsinc.c
parentbuild: Build gpgcompose only in maintainer mode (diff)
downloadgnupg2-4dc4fb1c14b3096bb1cdc5923c0d1eb419036805.tar.xz
gnupg2-4dc4fb1c14b3096bb1cdc5923c0d1eb419036805.zip
doc: Install gpg and gpgv man pages under the correct name.
* doc/mkdefsinc.c (main): Add double include guard. Set variable gpgtwohack. Define macros gpgname and gpgvname. * doc/gpg.texi: Remove macro definition for gpgname. Use Texinfo var gpgtwohack to prepare the man pages. Use @gpgname everywhere. * doc/gpgv.texi: Likewise. * doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add them depending on USE_GPG2_HACK. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc/mkdefsinc.c')
-rw-r--r--doc/mkdefsinc.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/doc/mkdefsinc.c b/doc/mkdefsinc.c
index 6495585d1..f3e2f35c7 100644
--- a/doc/mkdefsinc.c
+++ b/doc/mkdefsinc.c
@@ -49,6 +49,13 @@
#endif /*HAVE_W32_SYSTEM*/
+#if USE_GPG2_HACK
+# define gpg2_suffix "2"
+#else
+# define gpg2_suffix ""
+#endif
+
+
static int verbose;
@@ -267,7 +274,17 @@ main (int argc, char **argv)
fputs ("@c defs.inc -*- texinfo -*-\n"
"@c Common and build specific constants for the manuals.\n"
- "@c This file has been created by " PGM ".\n", stdout);
+ "@c This file has been created by " PGM ".\n\n", stdout);
+
+ fputs ("@ifclear defsincincluded\n"
+ "@set defsincincluded 1\n\n", stdout);
+
+
+ fputs ("\n@c Flags\n\n", stdout);
+
+#if USE_GPG2_HACK
+ fputs ("@set gpgtwohack 1\n\n", stdout);
+#endif
fputs ("\n@c Directories\n\n", stdout);
@@ -306,8 +323,16 @@ main (int argc, char **argv)
/* Fixme: Use a config.h macro here: */
fputs ("@set GPGSYMENCALGO AES-128\n", stdout);
+ fputs ("\n@c Macros\n\n", stdout);
+
+ printf ("@macro gpgname\n%s%s\n@end macro\n", GPG_NAME, gpg2_suffix);
+ printf ("@macro gpgvname\n%sv%s\n@end macro\n", GPG_NAME, gpg2_suffix);
+
+ /* Trailer. */
fputs ("\n"
+ "@end ifclear\n"
+ "\n"
"@c Loc" "al Variables:\n"
"@c buffer-read-only: t\n"
"@c End:\n", stdout);