| 1 | # https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html |
| 2 | |
| 3 | VERSION := 27.1 |
| 4 | SRC_DIR := emacs-$(VERSION) |
| 5 | SRC_TARBALL := $(SRC_DIR).tar.gz |
| 6 | |
| 7 | .PHONY: configure_build_install |
| 8 | configure_build_install: data/$(SRC_DIR) |
| 9 | cd data/$(SRC_DIR) && ./configure |
| 10 | cd data/$(SRC_DIR) && make -j$(shell nproc) |
| 11 | cd data/$(SRC_DIR) && make -j$(shell nproc) install |
| 12 | |
| 13 | data/$(SRC_DIR): $(SRC_TARBALL) |
| 14 | cd data && tar -vxzf $(SRC_TARBALL) |
| 15 | |
| 16 | $(SRC_TARBALL): |
| 17 | mkdir -p data |
| 18 | cd data && wget -c https://ftp.gnu.org/pub/gnu/emacs/$(SRC_TARBALL) |