From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] [maint] Avoid no-op config-subst for libguile/guile-func-name-check. Date: Fri, 25 Jun 2010 14:11:31 +0200 Message-ID: <87fx0bfh1o.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1277494726 3552 80.91.229.12 (25 Jun 2010 19:38:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2010 19:38:46 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 25 21:38:42 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OSEjZ-0003XC-KE for guile-devel@m.gmane.org; Fri, 25 Jun 2010 21:38:42 +0200 Original-Received: from localhost ([127.0.0.1]:33690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSEjY-0000Yz-9d for guile-devel@m.gmane.org; Fri, 25 Jun 2010 15:38:40 -0400 Original-Received: from [140.186.70.92] (port=55903 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSD2z-0005eG-Nj for guile-devel@gnu.org; Fri, 25 Jun 2010 13:50:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OS7t3-00007m-C1 for guile-devel@gnu.org; Fri, 25 Jun 2010 08:20:04 -0400 Original-Received: from smtp208.alice.it ([82.57.200.104]:37400) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OS7t2-000064-R8 for guile-devel@gnu.org; Fri, 25 Jun 2010 08:20:01 -0400 Original-Received: from ambire.localdomain (95.244.64.152) by smtp208.alice.it (8.5.124.08) id 4C1A27160090C182 for guile-devel@gnu.org; Fri, 25 Jun 2010 14:20:00 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1OS7qg-0004vj-ST for guile-devel@gnu.org; Fri, 25 Jun 2010 14:17:34 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10572 Archived-At: --=-=-= This is a very simple change. I hope you like it. thi _____________________________________________ --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0002-maint-Avoid-no-op-config-subst-for-libguile-guile-fu.patch Content-Transfer-Encoding: quoted-printable >From ad52ea336b86933d33f36910b6bfbcbffbd9e76e Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 17 Jun 2010 16:12:40 +0200 Subject: [PATCH 2/8] [maint] Avoid no-op config-subst for libguile/guile-fu= nc-name-check. MIME-Version: 1.0 Content-Type: text/plain; charset=3Dutf-8 Content-Transfer-Encoding: 8bit * configure.ac (libguile/guile-func-name-check): Remove =E2=80=98GUILE_CONF= IG_SCRIPT=E2=80=99. * libguile/Makefile.am (.c.doc): Look in $(srcdir) for awk script. * libguile/guile-func-name-check: Rename from guile-func-name-check.in. --- configure.ac | 1 - libguile/Makefile.am | 8 ++-- libguile/guile-func-name-check | 65 +++++++++++++++++++++++++++++++++= ++++ libguile/guile-func-name-check.in | 65 ---------------------------------= ---- 4 files changed, 69 insertions(+), 70 deletions(-) create mode 100644 libguile/guile-func-name-check delete mode 100644 libguile/guile-func-name-check.in diff --git a/configure.ac b/configure.ac index ed69a9f..0a44265 100644 --- a/configure.ac +++ b/configure.ac @@ -1656,7 +1656,6 @@ GUILE_CONFIG_SCRIPT([meta/gdb-uninstalled-guile]) GUILE_CONFIG_SCRIPT([meta/guile-tools]) GUILE_CONFIG_SCRIPT([libguile/guile-snarf]) GUILE_CONFIG_SCRIPT([libguile/guile-doc-snarf]) -GUILE_CONFIG_SCRIPT([libguile/guile-func-name-check]) GUILE_CONFIG_SCRIPT([libguile/guile-snarf-docs]) GUILE_CONFIG_SCRIPT([test-suite/standalone/test-use-srfi]) GUILE_CONFIG_SCRIPT([test-suite/standalone/test-fast-slot-ref]) diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 6a33473..5897d03 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -63,7 +63,7 @@ gen-scmconfig.$(OBJEXT): gen-scmconfig.c fi =20 ## Override default rule; this should run on BUILD host. -gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENC= IES)=20 +gen-scmconfig$(EXEEXT): $(gen_scmconfig_OBJECTS) $(gen_scmconfig_DEPENDENC= IES) $(AM_V_GEN) \ rm -f gen-scmconfig$(EXEEXT); \ if [ "$(cross_compiling)" =3D "yes" ]; then \ @@ -94,7 +94,7 @@ c-tokenize.$(OBJEXT): c-tokenize.c fi =20 ## Override default rule; this should run on BUILD host. -guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $= (guile_filter_doc_snarfage_DEPENDENCIES)=20 +guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $= (guile_filter_doc_snarfage_DEPENDENCIES) $(AM_V_GEN) \ rm -f guile_filter_doc_snarfage$(EXEEXT); \ if [ "$(cross_compiling)" =3D "yes" ]; then \ @@ -466,7 +466,7 @@ endif HAVE_LD_VERSION_SCRIPT =20 =20 # These are headers visible as -pkginclude_HEADERS =3D=20 +pkginclude_HEADERS =3D =20 # These are headers visible as . modincludedir =3D $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/libguile @@ -667,7 +667,7 @@ AM_V_FILTER_0 =3D @echo " FILTER" $@; .c.x: $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts) .c.doc: - -$(AM_V_FILTER)$(AWK) -f ./guile-func-name-check $< && (./guile-snarf-doc= s $(snarfcppopts) $< | ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfa= ge) > $@ || { rm $@; false; } + -$(AM_V_FILTER)$(AWK) -f $(srcdir)/guile-func-name-check $< && (./guile-s= narf-docs $(snarfcppopts) $< | ./guile_filter_doc_snarfage$(EXEEXT) --filte= r-snarfage) > $@ || { rm $@; false; } =20 $(DOT_X_FILES) $(EXTRA_DOT_X_FILES): scmconfig.h snarf.h guile-snarf.in =20 diff --git a/libguile/guile-func-name-check b/libguile/guile-func-name-check new file mode 100644 index 0000000..8b4924e --- /dev/null +++ b/libguile/guile-func-name-check @@ -0,0 +1,65 @@ +#!/usr/bin/awk -f +# +# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. +#=20 +# 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. +#=20 +# 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. +#=20 +# 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, +# 11-Jan-2000 + +BEGIN { + filename =3D ARGV[1]; + in_a_func =3D 0; +} + +/^SCM_DEFINE/ {=20 + func_name =3D $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 =3D 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 "'" > "/d= ev/stderr"; + } else { + sub(/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line); + sub(/[ \t]*$/,"",last_line); + if (last_line !=3D func_name) { + printf filename ":" NR ":***" > "/dev/stderr"; + print "Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_" fun= c_name "'" > "/dev/stderr"; + } + } +} + +1 =3D=3D 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 =3D ""; + func_name =3D ""; + next_line_better_be_undef =3D 0; +} + +/^\}/ && in_a_func { + next_line_better_be_undef =3D 1; +} + +{ last_line =3D $0; } diff --git a/libguile/guile-func-name-check.in b/libguile/guile-func-name-c= heck.in deleted file mode 100644 index 8b4924e..0000000 --- a/libguile/guile-func-name-check.in +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/awk -f -# -# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. -#=20 -# 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. -#=20 -# 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. -#=20 -# 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, -# 11-Jan-2000 - -BEGIN { - filename =3D ARGV[1]; - in_a_func =3D 0; -} - -/^SCM_DEFINE/ {=20 - func_name =3D $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 =3D 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 "'" > "/d= ev/stderr"; - } else { - sub(/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line); - sub(/[ \t]*$/,"",last_line); - if (last_line !=3D func_name) { - printf filename ":" NR ":***" > "/dev/stderr"; - print "Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_" fun= c_name "'" > "/dev/stderr"; - } - } -} - -1 =3D=3D 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 =3D ""; - func_name =3D ""; - next_line_better_be_undef =3D 0; -} - -/^\}/ && in_a_func { - next_line_better_be_undef =3D 1; -} - -{ last_line =3D $0; } --=20 1.6.3.2 --=-=-=--