Makefile 929 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. SHELL := guix time-machine --channels=guix-env/channels.scm -- shell --check --manifest=guix-env/manifest.scm -- bash -c
  2. # .SHELLFLAGS = -Euxo pipefail -c
  3. .SHELLFLAGS = -Euo pipefail -c
  4. GUILE_LOAD_PATH := .
  5. GUILE_LOAD_PATH += contracts
  6. GUILE_LOAD_PATH += commands
  7. GUILE_LOAD_PATH += test
  8. GUILE_LOAD_PATH_ARG := $(foreach dir, $(GUILE_LOAD_PATH),-L $(dir))
  9. GUILE_LOADED_FILES := shell.scm
  10. GUILE_LOADED_FILES += commands.scm
  11. GUILE_LOADED_FILES_ARG := $(foreach file, $(GUILE_LOADED_FILES),-l $(file))
  12. TEST_MODULES := $(wildcard test/*.scm)
  13. .DEFAULT: test
  14. .PHONY: print-test-modules
  15. print-test-modules:
  16. printf "%s\n" "$(TEST_MODULES)"
  17. .PHONY: test
  18. test:
  19. # Not using (foreach ...) here, to avoid very long commands.
  20. for module in $(TEST_MODULES) ; do \
  21. guile $(GUILE_LOAD_PATH_ARG) "$${module}" ; \
  22. done
  23. .PHONY: shell
  24. shell:
  25. env INSIDE_EMACS=1 guile --listen=12345 $(GUILE_LOAD_PATH_ARG) $(GUILE_LOADED_FILES_ARG)