diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-12 17:07:19 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-12 17:08:06 +0300 |
commit | 391b9afdd48db47f95567dbf1c3c9d2cc1029415 (patch) | |
tree | 2e156976196bf69a5c3576eb6ef2895186c0f5e4 /scripts | |
parent | 0f24a2b0845a519e011b58e2d92a2752c2e73e5e (diff) | |
download | gamma-391b9afdd48db47f95567dbf1c3c9d2cc1029415.tar.gz gamma-391b9afdd48db47f95567dbf1c3c9d2cc1029415.tar.bz2 |
Migrate Guile support to GINT.
* Makefile.am, configure.ac, src/Makefile.am: Migrate to GINT.
* modules/expat: Remove dependency on *.inc
* modules/sql: Likewise.
* modules/syslog: Likewise.
* scripts/bootstrap (reconfig-command): Add calls to
`git submodule'.
* src/documentation.sci: New file.
* src/expat.sci: Use module (gamma documentation).
Remove inclusion of *.inc files.
* src/sql.sci: Likewise.
* src/syslog.sci: Likewise.
* src/gamma-expat.c: Use SCM_DEFINE_PUBLIC to define
public interfaces.
* src/gsql_conn.c: Likewise.
* src/syslog-port.c: Likewise.
* src/syslog.c: Likewise.
* am/guile.m4: Remove.
* scripts/guile-doc-snarf.awk: Remove.
* scripts/guile-doc-snarf: Remove.
* scripts/Makefile.am (EXTRA_DIST): Remove
guile-doc-snarf.awk and guile-doc-snarf.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/bootstrap | 3 | ||||
-rwxr-xr-x | scripts/guile-doc-snarf | 72 | ||||
-rw-r--r-- | scripts/guile-doc-snarf.awk | 88 |
4 files changed, 2 insertions, 163 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index a4552de..3364ed8 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -16,6 +16,4 @@ EXTRA_DIST = \ bootstrap\ - guile-doc-snarf\ - guile-doc-snarf.awk\ gitlog-to-changelog diff --git a/scripts/bootstrap b/scripts/bootstrap index 288f0e9..9c37074 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -37,7 +37,8 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))" (define autogenerated-file-header (list "-*- buffer-read-only: t -*- vi: set ro:" "DO NOT EDIT! GENERATED AUTOMATICALLY!")) -(define reconfig-command "autoreconf -f -i -s") +(define reconfig-command + "git submodule init && git submodule update && autoreconf -f -i -s") (define files-from #f) (define create-parents #f) diff --git a/scripts/guile-doc-snarf b/scripts/guile-doc-snarf deleted file mode 100755 index 6cc184f..0000000 --- a/scripts/guile-doc-snarf +++ /dev/null @@ -1,72 +0,0 @@ -#! /bin/sh -# Copyright (C) 2002, 2010 Sergey Poznyakoff -# -# This is a snarfer for guile version 1.6 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -OUTFILE=/dev/tty -DOCFILE=0 -BASEDIR=`dirname $0` -test -n "${CPP+set}" || CPP="gcc -E" -test -n "${AWK+set}" || AWK=awk -temp=/tmp/snarf.$$ -trap "rm -f $temp" 0 1 2 15 - -# process aruments -while [ $# -gt 0 ]; -do - case $1 in - -o) OUTFILE=$2; shift 2;; - -d) DOCFILE=1; shift;; - *) break;; - esac -done - -INFILE=$1; shift - -cpp_exit=1 - -snarf_x() { - echo "/* source: $INFILE */" ; - echo "/* cpp arguments: $@ */" ; - $CPP -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} - cpp_exit=$? - grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" -e "s/\^\ *:\ *\^.*/;/" -} - -snarf_doc() { - $CPP -DSCM_MAGIC_SNARF_DOCS "$@" > ${temp} - cpp_exit=$? - $AWK ' -NF<2 {next} -state == 0 && /\^\^ {/ { state = 1; print; next } -state == 0 && /\^\^/ { print } -state == 1 && /\^\^ }/ { state = 0; print; next } -state == 1 { print } -state == 0 { next }' $temp |\ - tr -d '\n' | tr '^' '\n' |\ - awk -f $BASEDIR/guile-doc-snarf.awk > $OUTFILE -} - -case "$DOCFILE" in - 0) snarf_x $INFILE "$@" > $OUTFILE;; - 1) snarf_doc $INFILE "$@" > $OUTFILE;; -esac - -if [ $cpp_exit -ne 0 ]; then - [ "$OUTFILE" != "/dev/tty" ] && rm $OUTFILE -fi -exit $cpp_exit diff --git a/scripts/guile-doc-snarf.awk b/scripts/guile-doc-snarf.awk deleted file mode 100644 index 2c8455e..0000000 --- a/scripts/guile-doc-snarf.awk +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (C) 2002, 2010 Sergey Poznyakoff -# -# This is a snarfer for guile version 1.6 -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. - -BEGIN { - cname = "" -} - -function flush() { - if (cname == "") - return; - if (arg_req + arg_opt + arg_var != numargs) - error(cname " incorrectly defined as taking " numargs " arguments") - - print "\f" cname - print "@c snarfed from " loc_source ":" loc_line - printf "@deffn {Scheme procedure} %s", cname - for (i = 1; i <= numargs; i++) - printf(" %s", arglist[i]) - print "" - print docstring - print "@end deffn\n" - - delete argpos - delete arglist - cname = "" -} - -function error(s) { - print loc_source ":" loc_line ": " s > "/dev/stderr" - exit 1 -} - -state == 0 && /{/ { - flush() - cname = $3 - next -} - -state == 0 && /fname/ { fname = $2; next } -state == 0 && /type/ { type = $2; next } -state == 0 && /location/ { loc_source = $2; loc_line = $3 } -state == 0 && /arglist/ { - match($0, "\\(.*\\)") - s = substr($0,RSTART+1,RLENGTH-2) - numargs = split(s, a, ",") - for (i = 1; i <= numargs; i++) { - m = split(a[i], b, "[ \t]*") - if (b[1] == "") { - t = b[2] - n = b[3] - m-- - } else { - t = b[1] - n = b[2] - } - if (m > 2 || t != "SCM") - error(cname ": wrong argument type for arg " i " " t) - arglist[i] = n - } -} -state == 0 && /argsig/ { arg_req = $2; arg_opt = $3; arg_var = $4 } - -state == 0 && /.*\"/ { - gsub("\"\"", "") - gsub("\\\\n", "\n") - match($0,"\".*\"") - docstring = substr($0,RSTART+1,RLENGTH-2) -} - -/argpos/ { argpos[$2] = $3 } - -END { - flush() -} |