mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
common: Fix AWK portability.
* common/Makefile.am: Use pkg_namespace. * common/mkstrtable.awk: Use pkg_namespace. Regexp fix. -- GnuPG-bug-Bug: 4459 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
64a5fd3727
commit
b6f0b0efa1
@ -149,13 +149,13 @@ if MAINTAINER_MODE
|
|||||||
audit-events.h: Makefile.am mkstrtable.awk exaudit.awk audit.h
|
audit-events.h: Makefile.am mkstrtable.awk exaudit.awk audit.h
|
||||||
$(AWK) -f $(srcdir)/exaudit.awk $(srcdir)/audit.h \
|
$(AWK) -f $(srcdir)/exaudit.awk $(srcdir)/audit.h \
|
||||||
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
|
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
|
||||||
-v namespace=eventstr_ > $(srcdir)/audit-events.h
|
-v pkg_namespace=eventstr_ > $(srcdir)/audit-events.h
|
||||||
|
|
||||||
# Create the status-codes.h include file from status.h
|
# Create the status-codes.h include file from status.h
|
||||||
status-codes.h: Makefile.am mkstrtable.awk exstatus.awk status.h
|
status-codes.h: Makefile.am mkstrtable.awk exstatus.awk status.h
|
||||||
$(AWK) -f $(srcdir)/exstatus.awk $(srcdir)/status.h \
|
$(AWK) -f $(srcdir)/exstatus.awk $(srcdir)/status.h \
|
||||||
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
|
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
|
||||||
-v namespace=statusstr_ > $(srcdir)/status-codes.h
|
-v pkg_namespace=statusstr_ > $(srcdir)/status-codes.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
#
|
#
|
||||||
# The variable prefix can be used to prepend a string to each message.
|
# The variable prefix can be used to prepend a string to each message.
|
||||||
#
|
#
|
||||||
# The variable namespace can be used to prepend a string to each
|
# The variable pkg_namespace can be used to prepend a string to each
|
||||||
# variable and macro name.
|
# variable and macro name.
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
@ -101,7 +101,7 @@ header {
|
|||||||
print "/* The purpose of this complex string table is to produce";
|
print "/* The purpose of this complex string table is to produce";
|
||||||
print " optimal code with a minimum of relocations. */";
|
print " optimal code with a minimum of relocations. */";
|
||||||
print "";
|
print "";
|
||||||
print "static const char " namespace "msgstr[] = ";
|
print "static const char " pkg_namespace "msgstr[] = ";
|
||||||
header = 0;
|
header = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -109,7 +109,7 @@ header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!header {
|
!header {
|
||||||
sub (/\#.+/, "");
|
sub (/#.+/, "");
|
||||||
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
||||||
|
|
||||||
if (/^$/)
|
if (/^$/)
|
||||||
@ -149,14 +149,14 @@ END {
|
|||||||
else
|
else
|
||||||
print " gettext_noop (\"" prefix last_msgstr "\");";
|
print " gettext_noop (\"" prefix last_msgstr "\");";
|
||||||
print "";
|
print "";
|
||||||
print "static const int " namespace "msgidx[] =";
|
print "static const int " pkg_namespace "msgidx[] =";
|
||||||
print " {";
|
print " {";
|
||||||
for (i = 0; i < coded_msgs; i++)
|
for (i = 0; i < coded_msgs; i++)
|
||||||
print " " pos[i] ",";
|
print " " pos[i] ",";
|
||||||
print " " pos[coded_msgs];
|
print " " pos[coded_msgs];
|
||||||
print " };";
|
print " };";
|
||||||
print "";
|
print "";
|
||||||
print "#define " namespace "msgidxof(code) (0 ? -1 \\";
|
print "#define " pkg_namespace "msgidxof(code) (0 ? -1 \\";
|
||||||
|
|
||||||
# Gather the ranges.
|
# Gather the ranges.
|
||||||
skip = code[0];
|
skip = code[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user