From: Matt Birkholz Date: Sun, 10 Apr 2016 19:34:07 +0000 (-0700) Subject: plugin Makefile.ams: remove generated -shim.c and -const.c from TAGS X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~58 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b16377f38302cb64eda72407c2a3439ca70dcf89;p=mit-scheme.git plugin Makefile.ams: remove generated -shim.c and -const.c from TAGS --- diff --git a/src/blowfish/Makefile.am b/src/blowfish/Makefile.am index 9606bffe9..0fa9c837f 100644 --- a/src/blowfish/Makefile.am +++ b/src/blowfish/Makefile.am @@ -85,11 +85,13 @@ CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd TESTS = blowfish-check.sh CLEANFILES += test +tags: tags-am + ./tags-fix.sh + all_sources = $(sources) -all_sources += blowfish.pkg blowfish-check.scm -all_sources += blowfish-adapter.c blowfish-shim.h -ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) -TAGS_DEPENDENCIES = $(all_sources) $(cdecls) +all_sources += blowfish-check.scm blowfish-adapter.c blowfish-shim.h +ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) blowfish.pkg +TAGS_DEPENDENCIES = $(all_sources) $(cdecls) blowfish.pkg install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ diff --git a/src/blowfish/tags-fix.sh b/src/blowfish/tags-fix.sh new file mode 100755 index 000000000..441c87fb6 --- /dev/null +++ b/src/blowfish/tags-fix.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Chop the generated -shim.c and -const.c files out of TAGS. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --batch-mode <<\EOF +(let ((name "blowfish")) + (let ((shim.c-prefix (string-append name "-shim.c,")) + (const.c-prefix (string-append name "-const.c,"))) + + (define (rewriter in out) + (let loop ((skipping? #f)) + (let ((line (read-line in))) + #;(if (eof-object? line) + (begin (write-string ": ") (newline)) + (if (string=? line "\f") + (begin (write-string ": ") (newline)) + (begin (write-string ": ") (write-string line) (newline)))) + (cond ((eof-object? line) + unspecific) + ((string=? line "\f") + (let ((next (read-line in))) + (cond ((eof-object? next) (error "Bogus TAGS format:" next)) + ((or (string-prefix? shim.c-prefix next) + (string-prefix? const.c-prefix next)) + (loop #t)) + (else + (write-string line out) + (newline out) + (write-string next out) + (newline out) + (loop #f))))) + (skipping? + (loop skipping?)) + (else + (write-string line out) + (newline out) + (loop skipping?)))))) + + (parameterize ((param:suppress-loading-message? #t)) + (load-option 'FFI)) + ((access rewrite-file (->environment '(ffi build))) + (merge-pathnames "TAGS") + rewriter))) +EOF diff --git a/src/gdbm/Makefile.am b/src/gdbm/Makefile.am index 345cd4b42..f8916e01a 100644 --- a/src/gdbm/Makefile.am +++ b/src/gdbm/Makefile.am @@ -85,11 +85,13 @@ CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd TESTS = gdbm-check.sh CLEANFILES += gdbm-check.db +tags: tags-am + ./tags-fix.sh + all_sources = $(sources) -all_sources += gdbm.pkg gdbm-check.scm -all_sources += gdbm-adapter.c gdbm-shim.h -ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) -TAGS_DEPENDENCIES = $(all_sources) $(cdecls) +all_sources += gdbm-check.scm gdbm-adapter.c gdbm-shim.h +ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) gdbm.pkg +TAGS_DEPENDENCIES = $(all_sources) $(cdecls) gdbm.pkg install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ diff --git a/src/gdbm/tags-fix.sh b/src/gdbm/tags-fix.sh new file mode 100755 index 000000000..441c87fb6 --- /dev/null +++ b/src/gdbm/tags-fix.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Chop the generated -shim.c and -const.c files out of TAGS. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --batch-mode <<\EOF +(let ((name "blowfish")) + (let ((shim.c-prefix (string-append name "-shim.c,")) + (const.c-prefix (string-append name "-const.c,"))) + + (define (rewriter in out) + (let loop ((skipping? #f)) + (let ((line (read-line in))) + #;(if (eof-object? line) + (begin (write-string ": ") (newline)) + (if (string=? line "\f") + (begin (write-string ": ") (newline)) + (begin (write-string ": ") (write-string line) (newline)))) + (cond ((eof-object? line) + unspecific) + ((string=? line "\f") + (let ((next (read-line in))) + (cond ((eof-object? next) (error "Bogus TAGS format:" next)) + ((or (string-prefix? shim.c-prefix next) + (string-prefix? const.c-prefix next)) + (loop #t)) + (else + (write-string line out) + (newline out) + (write-string next out) + (newline out) + (loop #f))))) + (skipping? + (loop skipping?)) + (else + (write-string line out) + (newline out) + (loop skipping?)))))) + + (parameterize ((param:suppress-loading-message? #t)) + (load-option 'FFI)) + ((access rewrite-file (->environment '(ffi build))) + (merge-pathnames "TAGS") + rewriter))) +EOF diff --git a/src/mcrypt/Makefile.am b/src/mcrypt/Makefile.am index 0afa47523..c3675d449 100644 --- a/src/mcrypt/Makefile.am +++ b/src/mcrypt/Makefile.am @@ -85,11 +85,13 @@ CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd TESTS = mcrypt-check.sh CLEANFILES += encrypted decrypted +tags: tags-am + ./tags-fix.sh + all_sources = $(sources) -all_sources += mcrypt.pkg mcrypt-check.scm -all_sources += mcrypt-adapter.c mcrypt-shim.h -ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) -TAGS_DEPENDENCIES = $(all_sources) $(cdecls) +all_sources += mcrypt-check.scm mcrypt-adapter.c mcrypt-shim.h +ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) mcrypt.pkg +TAGS_DEPENDENCIES = $(all_sources) $(cdecls) mcrypt.pkg install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ diff --git a/src/mcrypt/tags-fix.sh b/src/mcrypt/tags-fix.sh new file mode 100755 index 000000000..441c87fb6 --- /dev/null +++ b/src/mcrypt/tags-fix.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Chop the generated -shim.c and -const.c files out of TAGS. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --batch-mode <<\EOF +(let ((name "blowfish")) + (let ((shim.c-prefix (string-append name "-shim.c,")) + (const.c-prefix (string-append name "-const.c,"))) + + (define (rewriter in out) + (let loop ((skipping? #f)) + (let ((line (read-line in))) + #;(if (eof-object? line) + (begin (write-string ": ") (newline)) + (if (string=? line "\f") + (begin (write-string ": ") (newline)) + (begin (write-string ": ") (write-string line) (newline)))) + (cond ((eof-object? line) + unspecific) + ((string=? line "\f") + (let ((next (read-line in))) + (cond ((eof-object? next) (error "Bogus TAGS format:" next)) + ((or (string-prefix? shim.c-prefix next) + (string-prefix? const.c-prefix next)) + (loop #t)) + (else + (write-string line out) + (newline out) + (write-string next out) + (newline out) + (loop #f))))) + (skipping? + (loop skipping?)) + (else + (write-string line out) + (newline out) + (loop skipping?)))))) + + (parameterize ((param:suppress-loading-message? #t)) + (load-option 'FFI)) + ((access rewrite-file (->environment '(ffi build))) + (merge-pathnames "TAGS") + rewriter))) +EOF diff --git a/src/md5/Makefile.am b/src/md5/Makefile.am index 6b71c5e57..506286460 100644 --- a/src/md5/Makefile.am +++ b/src/md5/Makefile.am @@ -85,11 +85,13 @@ CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd TESTS = md5-check.sh CLEANFILES += sample +tags: tags-am + ./tags-fix.sh + all_sources = $(sources) -all_sources += md5.pkg md5-check.scm -all_sources += md5-adapter.c md5-shim.h -ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) -TAGS_DEPENDENCIES = $(all_sources) $(cdecls) +all_sources += md5-check.scm md5-adapter.c md5-shim.h +ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) md5.pkg +TAGS_DEPENDENCIES = $(all_sources) $(cdecls) md5.pkg install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ diff --git a/src/md5/tags-fix.sh b/src/md5/tags-fix.sh new file mode 100755 index 000000000..441c87fb6 --- /dev/null +++ b/src/md5/tags-fix.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Chop the generated -shim.c and -const.c files out of TAGS. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --batch-mode <<\EOF +(let ((name "blowfish")) + (let ((shim.c-prefix (string-append name "-shim.c,")) + (const.c-prefix (string-append name "-const.c,"))) + + (define (rewriter in out) + (let loop ((skipping? #f)) + (let ((line (read-line in))) + #;(if (eof-object? line) + (begin (write-string ": ") (newline)) + (if (string=? line "\f") + (begin (write-string ": ") (newline)) + (begin (write-string ": ") (write-string line) (newline)))) + (cond ((eof-object? line) + unspecific) + ((string=? line "\f") + (let ((next (read-line in))) + (cond ((eof-object? next) (error "Bogus TAGS format:" next)) + ((or (string-prefix? shim.c-prefix next) + (string-prefix? const.c-prefix next)) + (loop #t)) + (else + (write-string line out) + (newline out) + (write-string next out) + (newline out) + (loop #f))))) + (skipping? + (loop skipping?)) + (else + (write-string line out) + (newline out) + (loop skipping?)))))) + + (parameterize ((param:suppress-loading-message? #t)) + (load-option 'FFI)) + ((access rewrite-file (->environment '(ffi build))) + (merge-pathnames "TAGS") + rewriter))) +EOF diff --git a/src/mhash/Makefile.am b/src/mhash/Makefile.am index 56eb4db81..2d436639f 100644 --- a/src/mhash/Makefile.am +++ b/src/mhash/Makefile.am @@ -85,11 +85,13 @@ CLEANFILES += *.bin *.ext *.com *.bci *.moc *.fni *.crf *.fre *.pkd TESTS = mhash-check.sh CLEANFILES += sample +tags: tags-am + ./tags-fix.sh + all_sources = $(sources) -all_sources += mhash.pkg mhash-check.scm -all_sources += mhash-adapter.c mhash-shim.h -ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) -TAGS_DEPENDENCIES = $(all_sources) $(cdecls) +all_sources += mhash-check.scm mhash-adapter.c mhash-shim.h +ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls) mhash.pkg +TAGS_DEPENDENCIES = $(all_sources) $(cdecls) mhash.pkg install-data-hook: echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \ diff --git a/src/mhash/tags-fix.sh b/src/mhash/tags-fix.sh new file mode 100755 index 000000000..441c87fb6 --- /dev/null +++ b/src/mhash/tags-fix.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# -*-Scheme-*- +# +# Chop the generated -shim.c and -const.c files out of TAGS. + +set -e +: ${MIT_SCHEME_EXE=mit-scheme} +${MIT_SCHEME_EXE} --batch-mode <<\EOF +(let ((name "blowfish")) + (let ((shim.c-prefix (string-append name "-shim.c,")) + (const.c-prefix (string-append name "-const.c,"))) + + (define (rewriter in out) + (let loop ((skipping? #f)) + (let ((line (read-line in))) + #;(if (eof-object? line) + (begin (write-string ": ") (newline)) + (if (string=? line "\f") + (begin (write-string ": ") (newline)) + (begin (write-string ": ") (write-string line) (newline)))) + (cond ((eof-object? line) + unspecific) + ((string=? line "\f") + (let ((next (read-line in))) + (cond ((eof-object? next) (error "Bogus TAGS format:" next)) + ((or (string-prefix? shim.c-prefix next) + (string-prefix? const.c-prefix next)) + (loop #t)) + (else + (write-string line out) + (newline out) + (write-string next out) + (newline out) + (loop #f))))) + (skipping? + (loop skipping?)) + (else + (write-string line out) + (newline out) + (loop skipping?)))))) + + (parameterize ((param:suppress-loading-message? #t)) + (load-option 'FFI)) + ((access rewrite-file (->environment '(ffi build))) + (merge-pathnames "TAGS") + rewriter))) +EOF