mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
doc: Escape file names in generated macros.
* doc/mkdefsinc.c (print_filename): New. (main): Use it here. -- Our Jenkins uses an @ in directory names and thus our builds break. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e5896da666
commit
511c2522b9
@ -140,6 +140,27 @@ get_date_from_files (char **files)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* We need to escape file names for Texinfo. */
|
||||||
|
static void
|
||||||
|
print_filename (const char *prefix, const char *name)
|
||||||
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
fputs (prefix, stdout);
|
||||||
|
for (s=name; *s; s++)
|
||||||
|
switch (*s)
|
||||||
|
{
|
||||||
|
case '@': fputs ("@atchar{}", stdout); break;
|
||||||
|
case '{': fputs ("@lbracechar{}", stdout); break;
|
||||||
|
case '}': fputs ("@rbracechar{}", stdout); break;
|
||||||
|
case ',': fputs ("@comma{}", stdout); break;
|
||||||
|
case '\\':fputs ("@backslashchar{}", stdout); break;
|
||||||
|
case '#': fputs ("@hashchar{}", stdout); break;
|
||||||
|
default: putchar (*s); break;
|
||||||
|
}
|
||||||
|
putchar('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
@ -288,17 +309,16 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
fputs ("\n@c Directories\n\n", stdout);
|
fputs ("\n@c Directories\n\n", stdout);
|
||||||
|
|
||||||
fputs ("@set BINDIR " GNUPG_BINDIR "\n"
|
print_filename ("@set BINDIR ", GNUPG_BINDIR );
|
||||||
"@set LIBEXECDIR " GNUPG_LIBEXECDIR "\n"
|
print_filename ("@set LIBEXECDIR ", GNUPG_LIBEXECDIR );
|
||||||
"@set LIBDIR " GNUPG_LIBDIR "\n"
|
print_filename ("@set LIBDIR ", GNUPG_LIBDIR );
|
||||||
"@set DATADIR " GNUPG_DATADIR "\n"
|
print_filename ("@set DATADIR ", GNUPG_DATADIR );
|
||||||
"@set SYSCONFDIR " GNUPG_SYSCONFDIR "\n"
|
print_filename ("@set SYSCONFDIR ", GNUPG_SYSCONFDIR );
|
||||||
"@set LOCALSTATEDIR " GNUPG_LOCALSTATEDIR "\n"
|
print_filename ("@set LOCALSTATEDIR ", GNUPG_LOCALSTATEDIR );
|
||||||
"@set LOCALCACHEDIR " GNUPG_LOCALSTATEDIR
|
print_filename ("@set LOCALCACHEDIR ", (GNUPG_LOCALSTATEDIR
|
||||||
/* */ "/cache/" PACKAGE_NAME "\n"
|
"/cache/" PACKAGE_NAME));
|
||||||
"@set LOCALRUNDIR " GNUPG_LOCALSTATEDIR
|
print_filename ("@set LOCALRUNDIR ", (GNUPG_LOCALSTATEDIR
|
||||||
/* */ "/run/" PACKAGE_NAME "\n"
|
"/run/" PACKAGE_NAME));
|
||||||
, stdout);
|
|
||||||
|
|
||||||
p = xstrdup (GNUPG_SYSCONFDIR);
|
p = xstrdup (GNUPG_SYSCONFDIR);
|
||||||
pend = strrchr (p, '/');
|
pend = strrchr (p, '/');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user