Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Makefile --- GNU Makefile to build Guile code
  2. # Copyright © 2017, 2019 Alex Kost <alezost@gmail.com>
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # Commentary:
  16. # The only purpose of this Makefile is to build .scm files to check them
  17. # for potential errors.
  18. MODULES_DIR = modules
  19. MODULES = \
  20. $(MODULES_DIR)/al/guix/utils.scm \
  21. $(MODULES_DIR)/al/guix/packages.scm \
  22. $(MODULES_DIR)/al/guix/packages/emacs.scm \
  23. $(MODULES_DIR)/al/guix/packages/fonts.scm \
  24. $(MODULES_DIR)/al/guix/packages/games.scm \
  25. $(MODULES_DIR)/al/guix/packages/image.scm \
  26. $(MODULES_DIR)/al/guix/packages/misc.scm \
  27. $(MODULES_DIR)/al/guix/packages/x.scm \
  28. $(MODULES_DIR)/al/guix/services/linux.scm \
  29. $(MODULES_DIR)/al/guix/services/net.scm
  30. MISC_SCM_FILES = \
  31. system-config/bare-bones.scm \
  32. system-config/os-main.scm \
  33. system-config/os-32-to-64.scm
  34. SCM_FILES = $(MODULES) $(MISC_SCM_FILES)
  35. GO_FILES = $(SCM_FILES:%.scm=%.go)
  36. GUILEC_ENV = \
  37. GUILE_AUTO_COMPILE=0
  38. GUILEC_OPTS = \
  39. -Warity-mismatch \
  40. -Wformat \
  41. -Wunbound-variable
  42. GUILEC_ENV += \
  43. GUILE_WARN_DEPRECATED=detailed \
  44. GUILE_LOAD_PATH="$(MODULES_DIR):$$GUILE_LOAD_PATH" \
  45. GUILE_LOAD_COMPILED_PATH="$(MODULES_DIR):$$GUILE_LOAD_COMPILED_PATH"
  46. all: $(GO_FILES)
  47. $(GO_FILES): %.go: %.scm
  48. @$(GUILEC_ENV) guild compile $(GUILEC_OPTS) --output=$@ $<
  49. clean:
  50. $(RM) $(GO_FILES)
  51. .PHONY: clean
  52. # Makefile ends here