LED is a lightweight text editor written using Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
557 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. SHELL := /bin/bash
  2. FILE := tmp.txt
  3. CAT := bat
  4. ifeq (, $(shell which bat))
  5. $(error "No bat in $(PATH), consider installing ti")
  6. CAT = cat
  7. endif
  8. build_and_run: clean build run
  9. .PHONY : build_and_run build run clean testfile
  10. build :
  11. @echo "-> Building"
  12. @cd utils/; go build .; cd ..
  13. @go build .
  14. @echo "-> Done"
  15. run :
  16. @echo "-> Running"
  17. @./led $(FILE)
  18. clean :
  19. @echo "-> Cleaning up"
  20. @-rm led
  21. testfile :
  22. @echo -e "-> Generating test file"
  23. @echo -e "This is a line.\nThis is another line.\n\n\nThis is the end." > tmp.txt
  24. @$(CAT) tmp.txt