diff --git a/Makefile.am b/Makefile.am index 19c0221..bfcf70e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,44 +1,7 @@ include $(top_srcdir)/build-aux/guile-rules.am -TEST_EXTENSIONS = .scm .sh -SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE) -AM_SCM_LOG_FLAGS = --no-auto-compile -SH_LOG_COMPILER = $(top_builddir)/pre-inst-env $(top_builddir)/test.sh - -if HAVE_GENHTML - -lcov.info: all - $(top_builddir)/pre-inst-env $(top_builddir)/tools/coverage - -coverage: lcov.info - $(GENHTML) -o $(top_builddir)/coverage lcov.info - -endif # HAVE_GENHTML - -test-list: ; @echo $(TESTS) - -.PHONY: check-spec -check-spec: - $(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec check - -.PHONY: check-bootstrap -check-bootstrap: - guix build -f tests/bootstrap/bash-without-bash.scm - -.PHONY: check-gash -check-gash: - SHELL=gash $(top_builddir)/pre-inst-env $(top_builddir)/check.sh - -dist-hook: gen-ChangeLog - echo $(VERSION) > $(distdir)/.tarball-version - -.PHONY: gen-ChangeLog -gen-ChangeLog: - $(top_srcdir)/build-aux/gitlog-to-changelog \ - > $(distdir)/ChangeLog-t - rm -f $(distdir)/ChangeLog - mv $(distdir)/ChangeLog-t $(distdir)/ChangeLog - +# Modules and scripts +##################### GUILE_MODULES = \ gash/built-ins/break.scm \ @@ -91,6 +54,26 @@ scripts/gash: scripts/gash.in Makefile $(do_subst) < $(srcdir)/scripts/gash.in > scripts/gash chmod a+x scripts/gash +# Tests +####### + +TEST_EXTENSIONS = .scm .sh +SCM_LOG_COMPILER = $(top_builddir)/pre-inst-env $(GUILE) +AM_SCM_LOG_FLAGS = --no-auto-compile +SH_LOG_COMPILER = $(top_builddir)/pre-inst-env $(top_builddir)/test.sh + +.PHONY: check-spec +check-spec: + $(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec check + +.PHONY: check-bootstrap +check-bootstrap: + guix build -f tests/bootstrap/bash-without-bash.scm + +.PHONY: check-gash +check-gash: + SHELL=gash $(top_builddir)/pre-inst-env $(top_builddir)/check.sh + UNIT_TESTS = \ tests/unit/lexer.scm \ tests/unit/parser.scm \ @@ -226,9 +209,40 @@ XFAIL_TESTS = \ BROKEN_TESTS = \ tests/50-redirect-merge.sh +test-list: ; @echo $(TESTS) + +# Coverage +########## + +if HAVE_GENHTML + +lcov.info: all + $(top_builddir)/pre-inst-env $(top_builddir)/tools/coverage + +coverage: lcov.info + $(GENHTML) -o $(top_builddir)/coverage lcov.info + +endif # HAVE_GENHTML + +# Distribution +############## + +dist-hook: gen-ChangeLog + echo $(VERSION) > $(distdir)/.tarball-version + +.PHONY: gen-ChangeLog +gen-ChangeLog: + $(top_srcdir)/build-aux/gitlog-to-changelog \ + > $(distdir)/ChangeLog-t + rm -f $(distdir)/ChangeLog + mv $(distdir)/ChangeLog-t $(distdir)/ChangeLog + EXTRA_DIST += \ scripts/gash.in +# Cleaning +########## + CLEANFILES += \ $(bin_SCRIPTS) \ $(FULL_TESTS:tests/%.sh=tests/%.log) \