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
|
||||
main (int argc, char **argv)
|
||||
@ -288,17 +309,16 @@ main (int argc, char **argv)
|
||||
|
||||
fputs ("\n@c Directories\n\n", stdout);
|
||||
|
||||
fputs ("@set BINDIR " GNUPG_BINDIR "\n"
|
||||
"@set LIBEXECDIR " GNUPG_LIBEXECDIR "\n"
|
||||
"@set LIBDIR " GNUPG_LIBDIR "\n"
|
||||
"@set DATADIR " GNUPG_DATADIR "\n"
|
||||
"@set SYSCONFDIR " GNUPG_SYSCONFDIR "\n"
|
||||
"@set LOCALSTATEDIR " GNUPG_LOCALSTATEDIR "\n"
|
||||
"@set LOCALCACHEDIR " GNUPG_LOCALSTATEDIR
|
||||
/* */ "/cache/" PACKAGE_NAME "\n"
|
||||
"@set LOCALRUNDIR " GNUPG_LOCALSTATEDIR
|
||||
/* */ "/run/" PACKAGE_NAME "\n"
|
||||
, stdout);
|
||||
print_filename ("@set BINDIR ", GNUPG_BINDIR );
|
||||
print_filename ("@set LIBEXECDIR ", GNUPG_LIBEXECDIR );
|
||||
print_filename ("@set LIBDIR ", GNUPG_LIBDIR );
|
||||
print_filename ("@set DATADIR ", GNUPG_DATADIR );
|
||||
print_filename ("@set SYSCONFDIR ", GNUPG_SYSCONFDIR );
|
||||
print_filename ("@set LOCALSTATEDIR ", GNUPG_LOCALSTATEDIR );
|
||||
print_filename ("@set LOCALCACHEDIR ", (GNUPG_LOCALSTATEDIR
|
||||
"/cache/" PACKAGE_NAME));
|
||||
print_filename ("@set LOCALRUNDIR ", (GNUPG_LOCALSTATEDIR
|
||||
"/run/" PACKAGE_NAME));
|
||||
|
||||
p = xstrdup (GNUPG_SYSCONFDIR);
|
||||
pend = strrchr (p, '/');
|
||||
|
Loading…
x
Reference in New Issue
Block a user