Makefile 884 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # -*- mode: makefile -*
  2. packages.rec:
  3. ./build-aux/list-packages.sh `pwd` \
  4. | recsel --sort=name \
  5. | sed 's/ *$$//' >$@.tmp
  6. mv $@.tmp $@
  7. .PHONY: packages.rec
  8. .pkg.tmpl: Makefile
  9. echo '- [{{name}}@{{version}}]({{homepage}}) - {{synopsis}}' >$@
  10. packages.txt: packages.rec .pkg.tmpl
  11. recfmt -f .pkg.tmpl <$< >$@.tmp
  12. mv $@.tmp $@
  13. README.md: build-aux/README.m4 packages.txt
  14. m4 $< >$@.tmp
  15. mv $@.tmp $@
  16. help:
  17. @echo "Useful targets:"
  18. @echo "- README.md : Update package list"
  19. @echo "- check : run tests, currently runs linters"
  20. @echo "- build-check : check that packages build"
  21. :PHONY: help
  22. all: help
  23. # Run lints on all packages
  24. check: packages.rec
  25. guix lint -L `pwd` `recfmt "{{name}}@{{version}} " <packages.rec`
  26. # Check that every package builds
  27. build-check: packages.rec
  28. guix build -L `pwd` -k `recfmt "{{name}}@{{version}} " <packages.rec`