2019-05-17 18:59:50 +01:00
|
|
|
include $(top_srcdir)/build-aux/guile-rules.am
|
2017-12-09 17:01:40 +00:00
|
|
|
|
2019-05-17 19:08:28 +01:00
|
|
|
# Modules and scripts
|
|
|
|
#####################
|
2019-05-17 18:08:54 +01:00
|
|
|
|
2019-05-17 18:59:50 +01:00
|
|
|
GUILE_MODULES = \
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
gash/built-ins/break.scm \
|
|
|
|
gash/built-ins/cd.scm \
|
|
|
|
gash/built-ins/colon.scm \
|
|
|
|
gash/built-ins/command.scm \
|
|
|
|
gash/built-ins/continue.scm \
|
|
|
|
gash/built-ins/dot.scm \
|
|
|
|
gash/built-ins/echo.scm \
|
|
|
|
gash/built-ins/eval.scm \
|
|
|
|
gash/built-ins/exec.scm \
|
|
|
|
gash/built-ins/exit.scm \
|
|
|
|
gash/built-ins/export.scm \
|
|
|
|
gash/built-ins/false.scm \
|
|
|
|
gash/built-ins/pwd.scm \
|
|
|
|
gash/built-ins/read.scm \
|
|
|
|
gash/built-ins/readonly.scm \
|
|
|
|
gash/built-ins/return.scm \
|
|
|
|
gash/built-ins/set.scm \
|
|
|
|
gash/built-ins/shift.scm \
|
|
|
|
gash/built-ins/trap.scm \
|
|
|
|
gash/built-ins/true.scm \
|
|
|
|
gash/built-ins/type.scm \
|
|
|
|
gash/built-ins/umask.scm \
|
|
|
|
gash/built-ins/unset.scm \
|
|
|
|
gash/built-ins/utils.scm \
|
|
|
|
gash/built-ins.scm \
|
2018-12-16 02:38:48 +00:00
|
|
|
gash/config.scm \
|
|
|
|
gash/environment.scm \
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
gash/eval.scm \
|
2018-12-16 02:38:48 +00:00
|
|
|
gash/gash.scm \
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
gash/lexer.scm \
|
|
|
|
gash/parser.scm \
|
|
|
|
gash/pattern.scm \
|
2018-12-16 02:38:48 +00:00
|
|
|
gash/readline.scm \
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
gash/repl.scm \
|
|
|
|
gash/shell.scm \
|
2019-05-17 01:58:52 +01:00
|
|
|
gash/textual-ports.scm \
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
gash/word.scm
|
2017-12-09 17:01:40 +00:00
|
|
|
|
|
|
|
bin_SCRIPTS = \
|
2018-12-17 20:15:12 +00:00
|
|
|
scripts/gash
|
2017-12-09 17:01:40 +00:00
|
|
|
|
2018-12-05 03:33:36 +00:00
|
|
|
do_subst = sed \
|
|
|
|
-e 's,[@]GUILE[@],$(GUILE),g' \
|
2019-05-17 18:59:50 +01:00
|
|
|
-e 's,[@]MODDIR[@],$(guilemoduledir),g' \
|
|
|
|
-e 's,[@]GODIR[@],$(guileobjectdir),g'
|
2018-12-05 03:33:36 +00:00
|
|
|
|
2018-12-16 02:38:48 +00:00
|
|
|
scripts/gash: scripts/gash.in Makefile
|
|
|
|
$(do_subst) < $(srcdir)/scripts/gash.in > scripts/gash
|
|
|
|
chmod a+x scripts/gash
|
|
|
|
|
2019-05-17 19:08:28 +01:00
|
|
|
# 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
|
|
|
|
|
2018-12-12 19:23:09 +00:00
|
|
|
UNIT_TESTS = \
|
|
|
|
tests/unit/lexer.scm \
|
|
|
|
tests/unit/parser.scm \
|
|
|
|
tests/unit/pattern.scm \
|
|
|
|
tests/unit/shell.scm \
|
|
|
|
tests/unit/word.scm
|
|
|
|
|
2018-12-16 03:52:57 +00:00
|
|
|
FULL_TESTS = \
|
|
|
|
tests/00-exit.sh \
|
|
|
|
tests/00-exit-0.sh \
|
|
|
|
tests/00-exit-1.sh \
|
|
|
|
tests/00-exit-2.sh \
|
|
|
|
tests/00-exit-error.sh \
|
|
|
|
tests/00-exit-var.sh \
|
|
|
|
tests/01-script-newline.sh \
|
|
|
|
tests/01-script-semi.sh \
|
|
|
|
tests/01-script-backslash.sh \
|
|
|
|
tests/01-script-backslash-space.sh \
|
|
|
|
tests/01-script-backslash-twice.sh \
|
|
|
|
tests/01-script-arg-0.sh \
|
|
|
|
tests/01-script-arg-length.sh \
|
|
|
|
tests/01-script-arg-list.sh \
|
|
|
|
tests/01-script-shift.sh \
|
|
|
|
tests/03-echo.sh \
|
|
|
|
tests/03-echo-doublequotes.sh \
|
|
|
|
tests/03-echo-nesting.sh \
|
|
|
|
tests/03-echo-escaped-doublequotes.sh \
|
|
|
|
tests/03-echo-quoted-doublequotes.sh \
|
|
|
|
tests/03-echo-brace.sh \
|
|
|
|
tests/04-echo-var.sh \
|
|
|
|
tests/04-echo-equal.sh \
|
|
|
|
tests/04-echo-word-at.sh \
|
|
|
|
tests/04-echo-word-at-word.sh \
|
|
|
|
tests/05-assignment.sh \
|
|
|
|
tests/05-assignment-echo.sh \
|
|
|
|
tests/05-assignment-empty.sh \
|
|
|
|
tests/05-assignment-singlequote.sh \
|
|
|
|
tests/05-assignment-double-quote.sh \
|
|
|
|
tests/05-assignment-variable-word.sh \
|
|
|
|
tests/05-assignment-word-variable.sh \
|
|
|
|
tests/05-assignment-doublequoted-doublequotes.sh \
|
|
|
|
tests/06-compound-word.sh \
|
|
|
|
tests/06-command-compound-word.sh \
|
|
|
|
tests/07-variable-or.sh \
|
|
|
|
tests/07-variable-not-or.sh \
|
|
|
|
tests/07-variable-or-slash.sh \
|
|
|
|
tests/07-variable-or-variable.sh \
|
|
|
|
tests/07-variable-or-doublequote.sh \
|
|
|
|
tests/07-variable-or-empty.sh \
|
|
|
|
tests/08-variable-and.sh \
|
|
|
|
tests/08-variable-not-and.sh \
|
|
|
|
tests/10-if.sh \
|
|
|
|
tests/10-if-false.sh \
|
|
|
|
tests/10-if-word-variable.sh \
|
|
|
|
tests/10-if-multiple.sh \
|
|
|
|
tests/10-if-else.sh \
|
|
|
|
tests/10-else-multiple.sh \
|
|
|
|
tests/10-if-elif.sh \
|
|
|
|
tests/10-if-test.sh \
|
|
|
|
tests/10-if-test-false.sh \
|
|
|
|
tests/10-if-bracket.sh \
|
|
|
|
tests/10-if-bracket-false.sh \
|
|
|
|
tests/11-for.sh \
|
|
|
|
tests/11-for-split-sequence.sh \
|
|
|
|
tests/11-for-done-subshell.sh \
|
|
|
|
tests/20-semi.sh \
|
|
|
|
tests/20-or.sh \
|
|
|
|
tests/20-and.sh \
|
|
|
|
tests/20-pipe-exit-0.sh \
|
|
|
|
tests/20-pipe-exit-1.sh \
|
|
|
|
tests/20-pipe-sed.sh \
|
|
|
|
tests/20-exec.sh \
|
|
|
|
tests/30-substitution.sh \
|
|
|
|
tests/30-substitution-word.sh \
|
|
|
|
tests/30-substitution-backtick.sh \
|
|
|
|
tests/30-substitution-assignment.sh \
|
|
|
|
tests/30-for-substitution.sh \
|
|
|
|
tests/30-substitution-assignment.sh \
|
|
|
|
tests/30-substitution-assignment-at.sh \
|
|
|
|
tests/30-substitution-redirect.sh \
|
|
|
|
tests/40-eval.sh \
|
|
|
|
tests/40-eval-echo-variable.sh \
|
|
|
|
tests/40-assignment-eval-echo.sh \
|
|
|
|
tests/41-dot.sh \
|
|
|
|
tests/42-sh.sh \
|
|
|
|
tests/42-sh-export.sh \
|
2018-12-31 13:40:20 +00:00
|
|
|
tests/42-export-new.sh \
|
2018-12-31 17:08:48 +00:00
|
|
|
tests/42-sh-export-new.sh \
|
2019-01-01 21:01:05 +00:00
|
|
|
tests/43-trap-subshell.sh \
|
2018-12-16 03:52:57 +00:00
|
|
|
tests/50-iohere.sh \
|
|
|
|
tests/50-iohere-builtin.sh \
|
|
|
|
tests/50-redirect.sh \
|
|
|
|
tests/50-redirect-in.sh \
|
|
|
|
tests/50-redirect-append.sh \
|
|
|
|
tests/50-redirect-pipe.sh \
|
2018-12-31 13:49:01 +00:00
|
|
|
tests/50-redirect-sed.sh \
|
|
|
|
tests/50-redirect-space.sh \
|
2018-12-16 03:52:57 +00:00
|
|
|
tests/50-redirect-in-out.sh \
|
2019-01-01 11:24:14 +00:00
|
|
|
tests/50-redirect-clobber.sh \
|
2018-12-16 03:52:57 +00:00
|
|
|
tests/60-function.sh \
|
|
|
|
tests/60-function-at.sh \
|
|
|
|
tests/60-subst.sh \
|
|
|
|
tests/70-hash.sh \
|
|
|
|
tests/70-hash-hash.sh \
|
|
|
|
tests/70-percent.sh \
|
|
|
|
tests/70-percent-percent.sh \
|
|
|
|
tests/70-percent-space.sh \
|
|
|
|
tests/70-slash.sh \
|
|
|
|
tests/70-slash-string.sh \
|
|
|
|
tests/70-slash-string-slash.sh \
|
2018-12-31 13:49:01 +00:00
|
|
|
tests/100-cd.sh \
|
2018-12-16 03:52:57 +00:00
|
|
|
tests/100-cd-foo.sh \
|
|
|
|
tests/100-test.sh \
|
2019-01-02 12:16:12 +00:00
|
|
|
tests/100-test-false.sh \
|
2018-12-16 03:52:57 +00:00
|
|
|
tests/100-test-file.sh \
|
Remove external commands.
* gash/bournish-commands.scm, gash/commands/*, gash/compress.scm,
gash/guix-utils.scm, gash/lzw.scm, gash/ustar.scm: Delete files.
* gash/builtins.scm, gash/gash.scm, gash/script.scm: Remove references
to deleted modules.
* tests/100-basename-*, tests/100-dirname-*, tests/100-sed-*,
tests/100-tar-*, tests/100-tr-*: Delete files.
* Makefile.am: Remove deleted modules and tests.
2019-01-12 03:20:52 +00:00
|
|
|
tests/100-bracket-file.sh
|
2018-12-16 03:52:57 +00:00
|
|
|
|
|
|
|
TESTS = $(UNIT_TESTS) $(FULL_TESTS)
|
|
|
|
|
|
|
|
XFAIL_TESTS = \
|
2018-12-17 20:15:12 +00:00
|
|
|
tests/70-hash.sh \
|
|
|
|
tests/70-hash-hash.sh \
|
|
|
|
tests/70-percent.sh \
|
|
|
|
tests/70-percent-percent.sh \
|
|
|
|
tests/70-percent-space.sh \
|
|
|
|
tests/70-slash.sh \
|
|
|
|
tests/70-slash-string.sh \
|
|
|
|
tests/70-slash-string-slash.sh
|
2017-12-09 17:01:40 +00:00
|
|
|
|
2018-12-16 19:15:45 +00:00
|
|
|
# These tests will not be run. Put tests here
|
|
|
|
# that pass or fail based on environmental
|
|
|
|
# factors.
|
|
|
|
BROKEN_TESTS = \
|
2018-12-31 13:49:01 +00:00
|
|
|
tests/50-redirect-merge.sh
|
2018-12-16 19:15:45 +00:00
|
|
|
|
2019-05-17 19:12:58 +01:00
|
|
|
.PHONY: test-list
|
2019-05-17 19:08:28 +01:00
|
|
|
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
|
|
|
|
|
2019-05-17 18:59:50 +01:00
|
|
|
EXTRA_DIST += \
|
2018-12-17 20:15:12 +00:00
|
|
|
scripts/gash.in
|
2018-12-05 03:33:36 +00:00
|
|
|
|
2019-05-17 19:08:28 +01:00
|
|
|
# Cleaning
|
|
|
|
##########
|
|
|
|
|
2019-05-17 18:59:50 +01:00
|
|
|
CLEANFILES += \
|
2018-12-05 03:33:36 +00:00
|
|
|
$(bin_SCRIPTS) \
|
2019-05-17 04:29:19 +01:00
|
|
|
$(FULL_TESTS:tests/%.sh=tests/%.log) \
|
|
|
|
$(FULL_TESTS:tests/%.sh=tests/%.trs) \
|
2019-05-17 14:57:57 +01:00
|
|
|
$(FULL_TESTS:tests/%.sh=tests/%.1) \
|
|
|
|
$(FULL_TESTS:tests/%.sh=tests/%.2) \
|
2019-05-17 04:29:19 +01:00
|
|
|
$(UNIT_TESTS:tests/%.scm=tests/%.log) \
|
|
|
|
$(UNIT_TESTS:tests/%.scm=tests/%.trs)
|
2018-11-08 19:53:55 +00:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec clean
|