mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
On my 2016 MacBook Pro correction times are around 200ms with the daemon, compared to around 3-4 seconds without. There might be some issues if bundler depends heavily on gems included in the project, but we'll see how that goes.
60 lines
1.1 KiB
Makefile
60 lines
1.1 KiB
Makefile
#
|
|
# Default target.
|
|
#
|
|
|
|
default: vendor
|
|
|
|
.PHONY: new-version
|
|
new-version:
|
|
$(if $(shell which npx),,\
|
|
$(error No npx found in PATH, please install NodeJS))
|
|
$(if $(shell which standard-version),,\
|
|
$(error No standard-version found in PATH, install with: \
|
|
npm install -g standard-version))
|
|
|
|
npx standard-version
|
|
|
|
|
|
#
|
|
# Functions.
|
|
#
|
|
|
|
define vendored
|
|
VENDORED += $(1)
|
|
|
|
.SILENT: $(1)
|
|
$(1):
|
|
echo "fetching $(1)..." && \
|
|
mkdir -p "$(dir $(1))" && \
|
|
curl -s -L -o "$(1)" "$(2)" && \
|
|
([[ "$(1)" == "bin/"* ]] && chmod +x "$(1)") || exit 0
|
|
|
|
.PHONY: remove_$(1)
|
|
.SILENT: remove_$(1)
|
|
remove_$(1):
|
|
(test -f "$(1)" && rm "$(1)" && echo "removed $(1)") || exit 0
|
|
|
|
.PHONY: update_$(1)
|
|
.SILENT: update_$(1)
|
|
update_$(1): remove_$(1) $(1)
|
|
endef
|
|
|
|
|
|
#
|
|
# Defined vendored dependencies.
|
|
#
|
|
|
|
$(eval $(call vendored,bin/rubocop-daemon-wrapper,https://github.com/fohte/rubocop-daemon/raw/master/bin/rubocop-daemon-wrapper))
|
|
|
|
#
|
|
# Main targets.
|
|
#
|
|
|
|
vendor: $(VENDORED)
|
|
update_vendor: $(foreach file,$(VENDORED),update_$(file))
|
|
remove_vendor: $(foreach file,$(VENDORED),remove_$(file))
|
|
|
|
.PHONY: backup-elpa
|
|
backup-elpa:
|
|
tar -cjf elpa_$(shell date "+%Y-%m-%d").tar.bz2 elpa
|