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)/")' \
--- /dev/null
+#!/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 ": <eof>") (newline))
+ (if (string=? line "\f")
+ (begin (write-string ": <formfeed>") (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
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)/")' \
--- /dev/null
+#!/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 ": <eof>") (newline))
+ (if (string=? line "\f")
+ (begin (write-string ": <formfeed>") (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
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)/")' \
--- /dev/null
+#!/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 ": <eof>") (newline))
+ (if (string=? line "\f")
+ (begin (write-string ": <formfeed>") (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
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)/")' \
--- /dev/null
+#!/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 ": <eof>") (newline))
+ (if (string=? line "\f")
+ (begin (write-string ": <formfeed>") (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
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)/")' \
--- /dev/null
+#!/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 ": <eof>") (newline))
+ (if (string=? line "\f")
+ (begin (write-string ": <formfeed>") (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