Reorder Makefile and add section comments.

* Makefile.am: Reorder rules and add section header comments to
make the structure clear.
This commit is contained in:
Timothy Sample 2019-05-17 14:08:28 -04:00
parent 315815bbd6
commit 0f6eb40f44
1 changed files with 53 additions and 39 deletions

View File

@ -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) \