From: Matt Birkholz Date: Sat, 17 Mar 2018 09:07:53 +0000 (-0700) Subject: Punt check-doc.sh. X-Git-Tag: mit-scheme-pucked-x11-0.2.2~33 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d220c5b07f5fff3471d67b62bc46b8459073f4c9;p=mit-scheme.git Punt check-doc.sh. --- diff --git a/src/blowfish/Makefile.am b/src/blowfish/Makefile.am index e99fb63ed..0f5550b9a 100644 --- a/src/blowfish/Makefile.am +++ b/src/blowfish/Makefile.am @@ -86,9 +86,6 @@ CLEANFILES += @MIT_SCHEME_CLEAN@ TESTS = blowfish-check.sh CLEANFILES += test -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh blowfish @@ -98,7 +95,7 @@ TAGS_DEPENDENCIES = $(all_sources) $(cdecls) EXTRA_DIST += $(all_sources) $(cdecls) compile.scm blowfish.pkg EXTRA_DIST += blowfish-test.scm blowfish-check.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh debian +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh debian install-data-hook: ( echo '(add-plugin "blowfish" "@MIT_SCHEME_PROJECT@"'; \ diff --git a/src/blowfish/check-doc.sh b/src/blowfish/check-doc.sh deleted file mode 100755 index 1802bf43c..000000000 --- a/src/blowfish/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a Blowfish plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "blowfish") - (texi "blowfish.texi") - (pkg '(blowfish))) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF diff --git a/src/cairo/Makefile.am b/src/cairo/Makefile.am index b257d28e1..557795ada 100644 --- a/src/cairo/Makefile.am +++ b/src/cairo/Makefile.am @@ -87,9 +87,6 @@ CLEANFILES += stamp-shim stamp-scheme TESTS = cairo-check.sh -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh cairo @@ -98,7 +95,7 @@ TAGS_DEPENDENCIES = $(sources) $(cdecls) EXTRA_DIST += $(sources) $(cdecls) compile.sh cairo.pkg EXTRA_DIST += cairo-check.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh debian +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh debian install-data-hook: ( echo '(add-plugin "cairo" "@MIT_SCHEME_PROJECT@"'; \ diff --git a/src/cairo/check-doc.sh b/src/cairo/check-doc.sh deleted file mode 100755 index 3fad0fc80..000000000 --- a/src/cairo/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a Cairo plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "cairo") - (texi "cairo.texi") - (pkg '())) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF diff --git a/src/gdbm/Makefile.am b/src/gdbm/Makefile.am index 9aac96f4a..eb107ea32 100644 --- a/src/gdbm/Makefile.am +++ b/src/gdbm/Makefile.am @@ -86,9 +86,6 @@ CLEANFILES += @MIT_SCHEME_CLEAN@ TESTS = gdbm-check.sh CLEANFILES += gdbm-check.db -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh gdbm @@ -98,7 +95,7 @@ TAGS_DEPENDENCIES = $(all_sources) $(cdecls) EXTRA_DIST += $(all_sources) $(cdecls) compile.scm gdbm.pkg EXTRA_DIST += gdbm-check.scm gdbm-check.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh debian +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh debian install-data-hook: ( echo '(add-plugin "gdbm" "@MIT_SCHEME_PROJECT@"'; \ diff --git a/src/gdbm/check-doc.sh b/src/gdbm/check-doc.sh deleted file mode 100755 index a9a3ed0d9..000000000 --- a/src/gdbm/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a Gdbm plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "gdbm") - (texi "gdbm.texi") - (pkg '(gdbm))) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF diff --git a/src/glib/Makefile.am b/src/glib/Makefile.am index eabe887d9..205115ac4 100644 --- a/src/glib/Makefile.am +++ b/src/glib/Makefile.am @@ -98,9 +98,6 @@ CLEANFILES += stamp-shim stamp-scheme TESTS = glib-check-copy.sh glib-check-list.sh CLEANFILES += test-copy-1.txt -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh glib @@ -110,7 +107,7 @@ TAGS_DEPENDENCIES = $(all_sources) $(cdecls) EXTRA_DIST += $(all_sources) $(cdecls) compile.sh glib.pkg EXTRA_DIST += glib-tests.scm glib-check-copy.sh glib-check-list.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh debian +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh debian install-data-hook: ( echo '(add-plugin "glib" "@MIT_SCHEME_PROJECT@"'; \ diff --git a/src/glib/check-doc.sh b/src/glib/check-doc.sh deleted file mode 100755 index 771f6292b..000000000 --- a/src/glib/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a GLib plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "glib") - (texi "glib.texi") - (pkg '(glib))) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am index 5bec07fd9..5fdaa612b 100644 --- a/src/gtk/Makefile.am +++ b/src/gtk/Makefile.am @@ -125,9 +125,6 @@ CLEANFILES += stamp-shim stamp-scheme TESTS = gtk-check.sh -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh gtk @@ -137,7 +134,7 @@ TAGS_DEPENDENCIES = $(all_sources) $(cdecls) EXTRA_DIST += $(all_sources) $(cdecls) compile.sh gtk.pkg EXTRA_DIST += gtk-tests.scm gtk-check.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh EXTRA_DIST += gtkpanedview-3.6.0.c gtkscrolledview-3.6.0.c EXTRA_DIST += gtkpanedview-3.10.8.c gtkscrolledview-3.10.8.c EXTRA_DIST += gtkpanedview-3.14.13.c gtkscrolledview-3.14.13.c diff --git a/src/gtk/check-doc.sh b/src/gtk/check-doc.sh deleted file mode 100755 index 5ebe41658..000000000 --- a/src/gtk/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a Gtk plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "gtk") - (texi "gtk.texi") - (pkg '(gtk))) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF diff --git a/src/pango/Makefile.am b/src/pango/Makefile.am index a1df14554..4c1de01f2 100644 --- a/src/pango/Makefile.am +++ b/src/pango/Makefile.am @@ -84,9 +84,6 @@ CLEANFILES += stamp-shim stamp-scheme TESTS = pango-check.sh -check-local: - ./check-doc.sh - tags: tags-am ./tags-fix.sh pango @@ -95,7 +92,7 @@ TAGS_DEPENDENCIES = $(sources) $(cdecls) EXTRA_DIST += $(sources) $(cdecls) compile.sh pango.pkg EXTRA_DIST += pango-check.sh -EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh debian +EXTRA_DIST += make.scm optiondb.scm tags-fix.sh debian install-data-hook: ( echo '(add-plugin "pango" "@MIT_SCHEME_PROJECT@"'; \ diff --git a/src/pango/check-doc.sh b/src/pango/check-doc.sh deleted file mode 100755 index 196ff8b6b..000000000 --- a/src/pango/check-doc.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash -# -*-Scheme-*- -# -# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, -# 2016, 2017 Matthew Birkholz -# -# This file is part of a Pango plugin for MIT/GNU Scheme Pucked. -# -# This plugin 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 2 of the License, or -# (at your option) any later version. -# -# This plugin 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 plugin; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# Check the documentation. - -set -e -: ${MIT_SCHEME_EXE=mit-scheme} -${MIT_SCHEME_EXE} --batch-mode <<\EOF - -(let ((pkgset "pango") - (texi "pango.texi") - (pkg '())) - ;; Check that every binding exported to () or PKG has a - ;; corresponding @deffn in TEXI. - - (parameterize ((param:suppress-loading-message? #t)) - (load-option 'cref) - (load-option 'regular-expression)) - (define read-package-model) - (define pmodel/packages) - (define package/name) - (define package/bindings) - (define package/links) - (define link/source) - (define link/destination) - (define binding/package) - (define binding/name) - (let ((cref (->environment '(cross-reference)))) - (set! read-package-model (access read-package-model cref)) - (set! pmodel/packages (access pmodel/packages cref)) - (set! package/name (access package/name cref)) - (set! package/bindings (access package/bindings cref)) - (set! package/links (access package/links cref)) - (set! link/source (access link/source cref)) - (set! link/destination (access link/destination cref)) - (set! binding/package (access binding/package cref)) - (set! binding/name (access binding/name cref))) - - (define (deffn-name line) - (let ((regs (re-string-match - (string-append "@deffnx?" - " \\(Class\\|Procedure\\|{Generic Procedure}\\)" - " \\([-A-Za-z0-9<>?!+./:]+\\)") - line))) - (if regs - (intern (re-match-extract line regs 2)) - (error "Could not find binding name:" line)))) - - (define (texinfo-deffns lines) - (let ((len (vector-length lines))) - (let loop ((i 0) (deffns '())) - (if (fix:< i len) - (let ((line (vector-ref lines i))) - (loop (fix:1+ i) - (if (string-prefix? "@deffn" line) - (cons (deffn-name line) deffns) - deffns))) - deffns)))) - - (define (read-lines port) - (let loop () - (let ((line (read-line port))) - (if (eof-object? line) - '() - (cons line (loop)))))) - - (define (pmodel/find-package pmodel package-name) - (find-matching-item (pmodel/packages pmodel) - (lambda (p) (equal? package-name (package/name p))))) - - (define (pmodel/global-exports pmodel) - (define (global-exports package) - (append-map! (lambda (link) - (if (eq? '() (package/name - (binding/package - (link/destination link)))) - (list (binding/name (link/destination link))) - '())) - (package/links package))) - (append-map! global-exports (pmodel/packages pmodel))) - - (define (pmodel/package-bindings pmodel package-name) - (let ((package (pmodel/find-package pmodel package-name))) - (if package - (map binding/name (package/bindings package)) - (error "No such package:" package-name)))) - - (define (duplicates listset) - (let loop ((items listset) (duplicates '())) - (cond ((null? items) - (reverse! duplicates)) - ((memq (car items) (cdr items)) - (if (memq (car items) duplicates) - (loop (cdr items) duplicates) - (loop (cdr items) (cons (car items) duplicates)))) - (else - (loop (cdr items) duplicates))))) - - (define (minus set1 set2) - (let loop ((items set1) (difference '())) - (cond ((null? items) - difference) - ((memq (car items) set2) - (loop (cdr items) difference)) - (else - (loop (cdr items) (cons (car items) difference)))))) - - (define (check) - (let* ((texinfo (list->vector (call-with-input-file texi read-lines))) - (deffns (texinfo-deffns texinfo)) - (dups (duplicates deffns)) - (pmodel (read-package-model pkgset microcode-id/operating-system)) - (bindings (append (pmodel/global-exports pmodel) - (if (null? pkg) - '() - (pmodel/package-bindings pmodel pkg)))) - (missing (minus bindings deffns)) - (extras (minus deffns bindings))) - (if (not (null? dups)) - (for-each (lambda (name) (warn "multiple-descriptions:" name)) dups)) - (if (not (null? extras)) - (for-each (lambda (name) (warn "not bound:" name)) extras)) - (if (not (null? missing)) - (for-each (lambda (name) (warn "not documented:" name)) missing)))) - - (check) - ) -EOF