
SCRPTS = \
	check-test-compilation \
	check-test-program-linking \
	check-test-program-linking-racket \
	check-test-runs \
	check-test-runs-racket \
	compile-tests \
	link-test-programs \
	link-test-programs-scheme \
	link-test-programs-racket \
	run-test-programs \
	run-test-programs-racket \
	run-test-programs-w-output \
	run-test-programs-w-output-racket \
	get-theme-d-config-var

SCMSCRIPTS = $(patsubst %,%.scm,$(SCRPTS))

BINSCRIPTS = get-theme-d-config-var.scm

TOOLSCRIPTS = \
	check-test-compilation.scm \
	check-test-program-linking.scm \
	check-test-program-linking-racket.scm \
	check-test-runs.scm \
	check-test-runs-racket.scm \
	compile-tests.scm \
	link-test-programs.scm \
	link-test-programs-scheme.scm \
	link-test-programs-racket.scm \
	run-test-programs.scm \
	run-test-programs-racket.scm \
	run-test-programs-w-output.scm \
	run-test-programs-w-output-racket.scm \
	compare-output.sh

toolsdir = $(THEME_D_TOOLS_DIR)
tools_DATA = $(TOOLSCRIPTS) theme-d.el

scriptdir = $(THEME_D_SCRIPT_DIR)
script_DATA = $(BINSCRIPTS)

mybindir = $(bindir)
mybin_DATA = setup-theme-d-test-env

$(SCMSCRIPTS): %.scm: %.scm.in
	sed -e 's|@guile_version@|$(MY_GUILE_VERSION)|g' $< > $@
	chmod 755 $@

# Not sure if the following is needed.
install-data-hook::
	cd $(DESTDIR)/$(toolsdir) ; \
	chmod 755 $(TOOLSCRIPTS)
	cd $(DESTDIR)/$(scriptdir) ; \
	chmod 755 $(BINSCRIPTS)
	cd $(DESTDIR)/$(mybindir) ; \
	chmod 755 setup-theme-d-test-env
