mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
[maint] Avoid no-op config-subst for libguile/guile-func-name-check.
* configure.ac (libguile/guile-func-name-check): Remove ‘GUILE_CONFIG_SCRIPT’. * libguile/Makefile.am (.c.doc): Look in $(srcdir) for awk script. * libguile/guile-func-name-check: Rename from guile-func-name-check.in.
This commit is contained in:
parent
648da03259
commit
6a6df18794
3 changed files with 4 additions and 5 deletions
65
libguile/guile-func-name-check
Normal file
65
libguile/guile-func-name-check
Normal file
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/awk -f
|
||||
#
|
||||
# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 3, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this software; see the file COPYING.LESSER. If
|
||||
# not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
# Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# Written by Greg J. Badros, <gjb@cs.washington.edu>
|
||||
# 11-Jan-2000
|
||||
|
||||
BEGIN {
|
||||
filename = ARGV[1];
|
||||
in_a_func = 0;
|
||||
}
|
||||
|
||||
/^SCM_DEFINE/ {
|
||||
func_name = $0;
|
||||
sub(/^[^\(\n]*\([ \t]*/,"", func_name);
|
||||
sub(/[ \t]*,.*/,"", func_name);
|
||||
# print func_name; # GJB:FIXME:: flag to do this to list primitives?
|
||||
in_a_func = 1;
|
||||
}
|
||||
|
||||
/^\{/ && in_a_func {
|
||||
if (!match(last_line,/^#define[ \t]+FUNC_NAME[ \t]+/)) {
|
||||
printf filename ":" NR ":***" > "/dev/stderr";
|
||||
print "Missing or erroneous `#define FUNC_NAME s_" func_name "'" > "/dev/stderr";
|
||||
} else {
|
||||
sub(/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line);
|
||||
sub(/[ \t]*$/,"",last_line);
|
||||
if (last_line != func_name) {
|
||||
printf filename ":" NR ":***" > "/dev/stderr";
|
||||
print "Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_" func_name "'" > "/dev/stderr";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1 == next_line_better_be_undef {
|
||||
if (!match($0,/^#undef FUNC_NAME[ \t]*$/)) {
|
||||
printf filename ":" NR ":***" > "/dev/stderr";
|
||||
print "Missing or erroneous #undef for " func_name ": "
|
||||
"Got `" $0 "' instead." > "/dev/stderr";
|
||||
}
|
||||
in_a_func = "";
|
||||
func_name = "";
|
||||
next_line_better_be_undef = 0;
|
||||
}
|
||||
|
||||
/^\}/ && in_a_func {
|
||||
next_line_better_be_undef = 1;
|
||||
}
|
||||
|
||||
{ last_line = $0; }
|
Loading…
Add table
Add a link
Reference in a new issue