scmlib_LTLIBRARIES = cairo-shim.la
scmlib_DATA = cairo-types.bin cairo-const.bin
-scmlib_cairo_DATA = cairo.scm cairo.bin cairo.bci cairo.com
-scmlib_cairo_DATA += cairo-graphics.scm cairo-graphics.bin
-scmlib_cairo_DATA += cairo-graphics.bci cairo-graphics.com
+
+sources = cairo.scm cairo-graphics.scm
+cdecls = cairo.cdecl
+
+scmlib_cairo_DATA = $(sources)
+scmlib_cairo_DATA += cairo.bin cairo.bci cairo.com
+scmlib_cairo_DATA += cairo-graphics.bin cairo-graphics.bci cairo-graphics.com
scmlib_cairo_DATA += make.scm cairo-@MIT_SCHEME_OS_SUFFIX@.pkd
info_TEXINFOS = mit-scheme-cairo.texi
cairo-shim.c: stamp-shim
cairo-const.c: stamp-shim
cairo-types.bin: stamp-shim
-stamp-shim: cairo.cdecl
+stamp-shim: $(cdecls)
touch stamp-shim
echo '(generate-shim "cairo" "#include <pango/pangocairo.h>")' \
| $(MIT_SCHEME_EXE) --batch-mode \
cairo-graphics.bci: stamp-scheme
cairo-graphics.com: stamp-scheme
cairo-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: stamp-shim cairo-graphics.scm cairo.scm
+stamp-scheme: stamp-shim $(sources) cairo.pkg
touch stamp-scheme
./compile.sh || rm stamp-scheme
check-local:
./check-doc.sh
-ETAGS_ARGS = cairo.scm cairo-graphics.scm -r '/^([^iI].*/' cairo.cdecl
-TAGS_DEPENDENCIES = cairo.scm cairo-graphics.scm cairo.cdecl
+tags: tags-am
+ ./tags-fix.sh cairo
+
+ETAGS_ARGS = $(sources) -r '/^([^iI].*/' $(cdecls)
+TAGS_DEPENDENCIES = $(sources) $(cdecls)
+
+EXTRA_DIST += $(sources) $(cdecls) cairo.pkg
+EXTRA_DIST += compile.sh cairo-check.sh
+EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
--- /dev/null
+#!/bin/sh
+# -*-Scheme-*-
+#
+# Chop the generated $1-shim.c and $1-const.c files out of TAGS.
+
+set -e
+: ${MIT_SCHEME_EXE=mit-scheme}
+${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF
+(let ((name (car (command-line))))
+ (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)))
+ (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
scmlib_LTLIBRARIES = gl-shim.la
scmlib_DATA = gl-types.bin gl-const.bin
-scmlib_gl_DATA = gl.scm gl.bin gl.bci gl.com
-scmlib_gl_DATA += gl-glx.scm gl-glx.bin gl-glx.bci gl-glx.com
-scmlib_gl_DATA += gl-glxgears.scm gl-glxgears.bin
-scmlib_gl_DATA += gl-glxgears.bci gl-glxgears.com
+sources = gl.scm gl-glx.scm gl-glxgears.scm
+cdecls = gl.cdecl
+
+scmlib_gl_DATA = $(sources)
+scmlib_gl_DATA += gl.bin gl.bci gl.com
+scmlib_gl_DATA += gl-glx.bin gl-glx.bci gl-glx.com
+scmlib_gl_DATA += gl-glxgears.bin gl-glxgears.bci gl-glxgears.com
scmlib_gl_DATA += make.scm gl-@MIT_SCHEME_OS_SUFFIX@.pkd
#info_TEXINFOS = mit-scheme-gl.texi
gl-shim.c: stamp-shim
gl-const.c: stamp-shim
gl-types.bin: stamp-shim
-stamp-shim: gl.cdecl gl-shim.h
+stamp-shim: gl-shim.h $(cdecls)
touch stamp-shim
echo '(generate-shim "gl" "#include \"gl-shim.h\"")' \
| $(MIT_SCHEME_EXE) --batch-mode \
gl.bci: stamp-scheme
gl.com: stamp-scheme
gl-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: stamp-shim gl.scm
+stamp-scheme: stamp-shim $(sources) gl.pkg
touch stamp-scheme
./compile.sh || rm stamp-scheme
TESTS = gl-check.sh
-ETAGS_FILES = gl-glxgears.scm
-ETAGS_FILES += gl-adapter.c gl-shim.h gl.scm gl-glx.scm
-ETAGS_CDECLS = gl.cdecl
-ETAGS_ARGS = $(ETAGS_FILES) -r '/^([^iI].*/' $(ETAGS_CDECLS)
-TAGS_DEPENDENCIES = $(ETAGS_FILES) $(ETAGS_CDECLS)
+tags: tags-am
+ ./tags-fix.sh gl
+
+all_sources = $(sources) gl-adapter.c
+ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls)
+TAGS_DEPENDENCIES = $(all_sources) $(cdecls)
+
+EXTRA_DIST += $(all_sources) $(cdecls) gl.pkg
+EXTRA_DIST += compile.sh gl-check.sh gl-tests.scm
+EXTRA_DIST += make.scm optiondb.scm tags-fix.sh
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
--- /dev/null
+#!/bin/sh
+# -*-Scheme-*-
+#
+# Chop the generated $1-shim.c and $1-const.c files out of TAGS.
+
+set -e
+: ${MIT_SCHEME_EXE=mit-scheme}
+${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF
+(let ((name (car (command-line))))
+ (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)))
+ (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
scmlib_LTLIBRARIES = glib-shim.la
scmlib_DATA = glib-types.bin glib-const.bin
-scmlib_glib_DATA = gio.scm gio.bin gio.bci gio.com
-scmlib_glib_DATA += glib-main.scm glib-main.bin glib-main.bci glib-main.com
-scmlib_glib_DATA += glib-thread.scm glib-thread.bin glib-thread.bci glib-thread.com
-scmlib_glib_DATA += glib.scm glib.bin glib.bci glib.com
-scmlib_glib_DATA += gobject.scm gobject.bin gobject.bci gobject.com
+sources = glib.scm gobject.scm gio.scm glib-main.scm glib-thread.scm
+cdecls = glib.cdecl Includes/*.cdecl Includes/*/*.cdecl
+
+scmlib_glib_DATA = $(sources)
+scmlib_glib_DATA += glib.bin glib.bci glib.com
+scmlib_glib_DATA += gobject.bin gobject.bci gobject.com
+scmlib_glib_DATA += gio.bin gio.bci gio.com
+scmlib_glib_DATA += glib-main.bin glib-main.bci glib-main.com
+scmlib_glib_DATA += glib-thread.bin glib-thread.bci glib-thread.com
scmlib_glib_DATA += make.scm glib-@MIT_SCHEME_OS_SUFFIX@.pkd
info_TEXINFOS = mit-scheme-glib.texi
glib-shim.c: stamp-shim
glib-const.c: stamp-shim
glib-types.bin: stamp-shim
-stamp-shim: glib.cdecl glib-shim.h Includes/*.cdecl Includes/*/*.cdecl
+stamp-shim: glib-shim.h $(cdecls)
touch stamp-shim
echo '(generate-shim "glib" "#include \"glib-shim.h\"")' \
| $(MIT_SCHEME_EXE) --batch-mode \
glib-const.scm: glib-const
./glib-const
+glib.bin: stamp-scheme
+glib.bci: stamp-scheme
+glib.com: stamp-scheme
+gobject.bin: stamp-scheme
+gobject.bci: stamp-scheme
+gobject.com: stamp-scheme
gio.bin: stamp-scheme
gio.bci: stamp-scheme
gio.com: stamp-scheme
glib-thread.bin: stamp-scheme
glib-thread.bci: stamp-scheme
glib-thread.com: stamp-scheme
-glib.bin: stamp-scheme
-glib.bci: stamp-scheme
-glib.com: stamp-scheme
-gobject.bin: stamp-scheme
-gobject.bci: stamp-scheme
-gobject.com: stamp-scheme
glib-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: stamp-shim gio.scm glib-main.scm glib-thread.scm glib.scm
+stamp-scheme: stamp-shim $(sources) glib.pkg
touch stamp-scheme
./compile.sh || rm stamp-scheme
check-local:
./check-doc.sh
-ETAGS_FILES = glibio.c
-ETAGS_FILES += glib.scm gobject.scm glib-main.scm glib-thread.scm
-ETAGS_FILES += gio.scm glib-tests.scm
-ETAGS_CDECLS = glib.cdecl Includes/*.cdecl Includes/*/*.cdecl
-ETAGS_ARGS = $(ETAGS_FILES) -r '/^([^iI].*/' $(ETAGS_CDECLS)
-TAGS_DEPENDENCIES = $(ETAGS_FILES) $(ETAGS_CDECLS)
+tags: tags-am
+ ./tags-fix.sh glib
+
+all_sources = $(sources) glibio.c
+ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls)
+TAGS_DEPENDENCIES = $(all_sources) $(cdecls)
+
+EXTRA_DIST += $(all_sources) $(cdecls) glib.pkg
+EXTRA_DIST += compile.sh glib-tests.scm glib-check-copy.sh glib-check-list.sh
+EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
--- /dev/null
+#!/bin/sh
+# -*-Scheme-*-
+#
+# Chop the generated $1-shim.c and $1-const.c files out of TAGS.
+
+set -e
+: ${MIT_SCHEME_EXE=mit-scheme}
+${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF
+(let ((name (car (command-line))))
+ (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)))
+ (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
scmlib_gtkdir = $(scmlibdir)/gtk
scmlib_LTLIBRARIES = gtk-shim.la
-scmlib_DATA = gtk-types.bin gtk-const.bin
-
-scmlib_gtk_DATA = conses.png
-scmlib_gtk_DATA += gtk-widget.scm gtk-widget.bin gtk-widget.bci gtk-widget.com
-scmlib_gtk_DATA += scm-widget.scm scm-widget.bin scm-widget.bci scm-widget.com
-scmlib_gtk_DATA += fix-layout.scm fix-layout.bin fix-layout.bci fix-layout.com
-scmlib_gtk_DATA += keys.scm keys.bin keys.bci keys.com
-scmlib_gtk_DATA += main.scm main.bin main.bci main.com
-scmlib_gtk_DATA += gtk-ev.scm gtk-ev.bin gtk-ev.bci gtk-ev.com
-scmlib_gtk_DATA += gtk-graphics.scm gtk-graphics.bin
-scmlib_gtk_DATA += gtk-graphics.bci gtk-graphics.com
-scmlib_gtk_DATA += fix-demo.scm fix-demo.bin fix-demo.bci fix-demo.com
-scmlib_gtk_DATA += swat.scm swat.bin swat.bci swat.com
-scmlib_gtk_DATA += swat-pole-zero.scm swat-pole-zero.bin
-scmlib_gtk_DATA += swat-pole-zero.bci swat-pole-zero.com
-scmlib_gtk_DATA += gdk.scm gdk.bin gdk.bci gdk.com
-scmlib_gtk_DATA += gtk.scm gtk.bin gtk.bci gtk.com
+scmlib_DATA = gtk-types.bin gtk-const.bin conses.png
+
+sources = gtk.scm gdk.scm gtk-widget.scm
+sources += scm-widget.scm fix-layout.scm keys.scm main.scm
+sources += gtk-ev.scm gtk-graphics.scm fix-demo.scm swat.scm
+sources += swat-pole-zero.scm
+cdecls = gtk.cdecl Includes/*.cdecl
+
+scmlib_gtk_DATA = $(sources)
+scmlib_gtk_DATA += gtk.bin gtk.bci gtk.com
+scmlib_gtk_DATA += gdk.bin gdk.bci gdk.com
+scmlib_gtk_DATA += gtk-widget.bin gtk-widget.bci gtk-widget.com
+scmlib_gtk_DATA += scm-widget.bin scm-widget.bci scm-widget.com
+scmlib_gtk_DATA += fix-layout.bin fix-layout.bci fix-layout.com
+scmlib_gtk_DATA += keys.bin keys.bci keys.com
+scmlib_gtk_DATA += main.bin main.bci main.com
+scmlib_gtk_DATA += gtk-ev.bin gtk-ev.bci gtk-ev.com
+scmlib_gtk_DATA += gtk-graphics.bin gtk-graphics.bci gtk-graphics.com
+scmlib_gtk_DATA += fix-demo.bin fix-demo.bci fix-demo.com
+scmlib_gtk_DATA += swat.bin swat.bci swat.com
+scmlib_gtk_DATA += swat-pole-zero.bin swat-pole-zero.bci swat-pole-zero.com
scmlib_gtk_DATA += make.scm gtk-@MIT_SCHEME_OS_SUFFIX@.pkd
info_TEXINFOS = mit-scheme-gtk.texi
AM_CFLAGS = `pkg-config --cflags gtk+-3.0`
LIBS = `pkg-config --libs gtk+-3.0 gthread-2.0`
-gtk_shim_la_LIBADD = gtkpanedview.lo gtkscrolledview.lo scmwidget.lo gtkio.lo
+gtk_shim_la_LIBADD = gtkio.lo scmwidget.lo gtkpanedview.lo gtkscrolledview.lo
+c_sources = gtk-shim.h gtkio.c
+c_sources += scmwidget.c scmwidget.h
+c_sources += gtkpanedview.c gtkpanedview.h
+c_sources += gtkscrolledview.c gtkscrolledview.h
gtk_shim_la_LDFLAGS = -module -avoid-version -shared
noinst_PROGRAMS = gtk-const
gtk-shim.c: stamp-shim
gtk-const.c: stamp-shim
gtk-types.bin: stamp-shim
-stamp-shim: gtk.cdecl gtk-shim.h Includes/*.cdecl
+stamp-shim: $(c_sources) $(cdecls)
touch stamp-shim
echo '(generate-shim "gtk" "#include \"gtk-shim.h\"")' \
| $(MIT_SCHEME_EXE) --batch-mode \
|| rm stamp-shim
-gtk-shim.o: gtk-shim.c gtk-shim.h
-
-gtkpanedview.o: gtkpanedview.c gtkpanedview.h
-
-gtkscrolledview.o: gtkscrolledview.c gtkscrolledview.h
-
-scmwidget.o: scmwidget.c scmwidget.h
-
gtk-const.bin: gtk-const.scm
echo '(sf "gtk-const")' | $(MIT_SCHEME_EXE) --batch-mode
gtk-const.scm: gtk-const
./gtk-const
+gtk.bin: stamp-scheme
+gtk.bci: stamp-scheme
+gtk.com: stamp-scheme
+gdk.bin: stamp-scheme
+gdk.bci: stamp-scheme
+gdk.com: stamp-scheme
gtk-widget.bin: stamp-scheme
gtk-widget.bci: stamp-scheme
gtk-widget.com: stamp-scheme
swat-pole-zero.bin: stamp-scheme
swat-pole-zero.bci: stamp-scheme
swat-pole-zero.com: stamp-scheme
-gdk.bin: stamp-scheme
-gdk.bci: stamp-scheme
-gdk.com: stamp-scheme
-gtk.bin: stamp-scheme
-gtk.bci: stamp-scheme
-gtk.com: stamp-scheme
gtk-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: stamp-shim gtk-widget.scm scm-widget.scm fix-layout.scm \
- keys.scm main.scm gtk-ev.scm gtk-graphics.scm fix-demo.scm \
- swat.scm swat-pole-zero.scm gdk.scm gtk.scm
+stamp-scheme: stamp-shim $(sources) gtk.pkg
touch stamp-scheme
./compile.sh || rm stamp-scheme
check-local:
./check-doc.sh
-ETAGS_FILES = gtk-widget.scm scm-widget.scm fix-layout.scm
-ETAGS_FILES += keys.scm main.scm gtk-ev.scm gtk-graphics.scm
-ETAGS_FILES += fix-demo.scm swat.scm swat-pole-zero.scm
-ETAGS_FILES += gdk.scm gtk.scm
-ETAGS_CDECLS = gtk.cdecl Includes/*.cdecl
-ETAGS_ARGS = $(ETAGS_FILES) -r '/^([^iI].*/' $(ETAGS_CDECLS)
-TAGS_DEPENDENCIES = $(ETAGS_FILES) $(ETAGS_CDECLS)
+tags: tags-am
+ ./tags-fix.sh gtk
+
+all_sources = $(source) $(c_sources)
+ETAGS_ARGS = $(all_sources) -r '/^([^iI].*/' $(cdecls)
+TAGS_DEPENDENCIES = $(all_sources) $(cdecls)
+
+EXTRA_DIST += $(all_sources) $(cdecls) gtk.pkg
+EXTRA_DIST += compile.sh gtk-check.sh gtk-tests.scm
+EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh
+EXTRA_DIST += gtkpanedview-3.10.8.c gtkscrolledview-3.10.8.c
+EXTRA_DIST += gtkpanedview-3.14.13.c gtkscrolledview-3.14.13.c
+EXTRA_DIST += gtkpanedview-3.16.7.c gtkscrolledview-3.16.7.c
+EXTRA_DIST += gtkpanedview-3.6.0.c gtkscrolledview-3.6.0.c
+EXTRA_DIST += conses.png hello.scm test-gport-performance.scm
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
--- /dev/null
+#!/bin/sh
+# -*-Scheme-*-
+#
+# Chop the generated $1-shim.c and $1-const.c files out of TAGS.
+
+set -e
+: ${MIT_SCHEME_EXE=mit-scheme}
+${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF
+(let ((name (car (command-line))))
+ (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)))
+ (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
scmlib_LTLIBRARIES = pango-shim.la
scmlib_DATA = pango-types.bin pango-const.bin
-scmlib_pango_DATA = make.scm
-scmlib_pango_DATA += pango.scm pango.bin pango.bci pango.com
-scmlib_pango_DATA += pango-@MIT_SCHEME_OS_SUFFIX@.pkd
+
+sources = pango.scm
+cdecls = pango.cdecl Includes/*.cdecl
+
+scmlib_pango_DATA = $(sources)
+scmlib_pango_DATA += pango.bin pango.bci pango.com
+scmlib_pango_DATA += make.scm pango-@MIT_SCHEME_OS_SUFFIX@.pkd
info_TEXINFOS = mit-scheme-pango.texi
AM_MAKEINFOHTMLFLAGS = --no-split
pango-shim.c: stamp-shim
pango-const.c: stamp-shim
pango-types.bin: stamp-shim
-stamp-shim: pango.cdecl Includes/*.cdecl
+stamp-shim: $(cdecls)
touch stamp-shim
echo '(generate-shim "pango" "#include <pango/pango.h>")' \
| $(MIT_SCHEME_EXE) --batch-mode \
pango.bci: stamp-scheme
pango.com: stamp-scheme
pango-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: stamp-shim pango.scm
+stamp-scheme: stamp-shim $(sources) pango.pkg
touch stamp-scheme
./compile.sh || rm stamp-scheme
check-local:
./check-doc.sh
-ETAGS_ARGS = pango.scm -r '/^([^iI].*/' pango.cdecl Includes/*.cdecl
-TAGS_DEPENDENCIES = pango.scm pango.cdecl Includes/*.cdecl
+tags: tags-am
+ ./tags-fix.sh pango
+
+ETAGS_ARGS = $(sources) -r '/^([^iI].*/' $(cdecls)
+TAGS_DEPENDENCIES = $(sources) $(cdecls)
+
+EXTRA_DIST += $(sources) $(cdecls) pango.pkg
+EXTRA_DIST += compile.sh pango-check.sh
+EXTRA_DIST += make.scm optiondb.scm check-doc.sh tags-fix.sh
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \
--- /dev/null
+#!/bin/sh
+# -*-Scheme-*-
+#
+# Chop the generated $1-shim.c and $1-const.c files out of TAGS.
+
+set -e
+: ${MIT_SCHEME_EXE=mit-scheme}
+${MIT_SCHEME_EXE} --batch-mode -- "${@}" <<\EOF
+(let ((name (car (command-line))))
+ (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)))
+ (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
## Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
-## Matthew Birkholz
-##
+## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
+## 2016 Matthew Birkholz
+##
## This file is part of a planetarium for MIT/GNU Scheme.
-##
+##
## This planetarium 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 planetarium 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 planetarium; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
scmlibdir = $(libdir)/mit-scheme-@MIT_SCHEME_ARCH@
scmlib_planetariumdir = $(scmlibdir)/planetarium
-source = earth.scm geometry.scm google-earth.scm graphics.scm
-source += matrices.scm mit-cairo.scm mit-cil.scm mit-graphics.scm mit-gtk.scm
-source += mit-r3rs.scm mit-syntax.scm mit-x.scm solar.scm tellurion.scm
-source += terrain.scm time.scm
+sources = earth.scm geometry.scm google-earth.scm graphics.scm
+sources += matrices.scm mit-cairo.scm mit-cil.scm mit-graphics.scm mit-gtk.scm
+sources += mit-r3rs.scm mit-syntax.scm mit-x.scm solar.scm tellurion.scm
+sources += terrain.scm time.scm
-scmlib_planetarium_DATA = $(source)
+scmlib_planetarium_DATA = $(sources)
scmlib_planetarium_DATA += earth.bin earth.bci earth.com
scmlib_planetarium_DATA += geometry.bin geometry.bci geometry.com
scmlib_planetarium_DATA += google-earth.bin google-earth.bci google-earth.com
scmlib_planetarium_DATA += tellurion.bin tellurion.bci tellurion.com
scmlib_planetarium_DATA += terrain.bin terrain.bci terrain.com
scmlib_planetarium_DATA += time.bin time.bci time.com
-scmlib_planetarium_DATA += make.scm mit-link.scm
-scmlib_planetarium_DATA += mit-@MIT_SCHEME_OS_SUFFIX@.pkd
-scmlib_planetarium_DATA += mit-3d-@MIT_SCHEME_OS_SUFFIX@.pkd
+scmlib_planetarium_DATA += make.scm mit-@MIT_SCHEME_OS_SUFFIX@.pkd
+scmlib_planetarium_DATA += mit-link.scm mit-3d-@MIT_SCHEME_OS_SUFFIX@.pkd
info_TEXINFOS = mit-scheme-planetarium.texi
AM_MAKEINFOHTMLFLAGS = --no-split
# Set these to the defaults used by Scheme.
infodir = $(datarootdir)/info
htmldir = $(libdir)/mit-scheme/doc
+dvidir = $(libdir)/mit-scheme/doc
+pdfdir = $(libdir)/mit-scheme/doc
make.scm: mit-make.scm
cp $< $@
time.com: stamp-scheme
mit-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
mit-3d-@MIT_SCHEME_OS_SUFFIX@.pkd: stamp-scheme
-stamp-scheme: $(source)
+stamp-scheme: $(sources) mit.pkg mit-3d.pkg
touch stamp-scheme
./mit-compile.sh || rm stamp-scheme
TESTS = mit-check.sh
CLEANFILES += sample-terrain.txt
-ETAGS_ARGS = $(source)
-TAGS_DEPENDENCIES = $(source)
+ETAGS_ARGS = $(sources)
+TAGS_DEPENDENCIES = $(sources)
+
+EXTRA_DIST += $(sources) mit.pkg mit-3d.pkg
+EXTRA_DIST += mit-compile.sh mit-link.scm mit-check.sh
+EXTRA_DIST += mit-make.scm mit-optiondb.scm cil-*.txt
+EXTRA_DIST += mit-snapshot.scm
install-data-hook:
echo '(update-optiondb "$(DESTDIR)$(scmlibdir)/")' \