zsh-autosuggestions/Makefile

60 lines
1.1 KiB
Makefile
Raw Normal View History

2016-02-06 06:14:08 +08:00
SRC_DIR := ./src
2016-03-06 11:53:07 +08:00
TEST_DIR := ./script
VENDOR_DIR := ./vendor
2016-02-06 06:14:08 +08:00
SRC_FILES := \
2016-02-06 06:14:08 +08:00
$(SRC_DIR)/config.zsh \
$(SRC_DIR)/deprecated.zsh \
$(SRC_DIR)/bind.zsh \
$(SRC_DIR)/highlight.zsh \
$(SRC_DIR)/widgets.zsh \
$(SRC_DIR)/suggestion.zsh \
$(SRC_DIR)/strategies/*.zsh \
2016-02-06 06:14:08 +08:00
$(SRC_DIR)/start.zsh
HEADER_FILES := \
DESCRIPTION \
URL \
VERSION \
LICENSE
PLUGIN_TARGET := zsh-autosuggestions.zsh
OH_MY_ZSH_LINK_TARGET := zsh-autosuggestions.plugin.zsh
ALL_TARGETS := \
$(PLUGIN_TARGET) \
$(OH_MY_ZSH_LINK_TARGET)
2016-03-06 11:53:07 +08:00
SHUNIT2 := $(VENDOR_DIR)/shunit2/2.1.6
STUB_SH := $(VENDOR_DIR)/stub.sh/stub.sh
TEST_PREREQS := \
$(SHUNIT2) \
$(STUB_SH)
TEST_FILES := \
2016-03-06 11:53:07 +08:00
$(TEST_DIR)/**/*.zsh
all: $(ALL_TARGETS)
$(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES)
2016-02-14 04:42:02 +08:00
cat $(HEADER_FILES) | sed -e 's/^/# /g' > $@
cat $(SRC_FILES) >> $@
2016-02-06 06:14:08 +08:00
$(OH_MY_ZSH_LINK_TARGET): $(PLUGIN_TARGET)
ln -s $(PLUGIN_TARGET) $@
2016-03-06 11:53:07 +08:00
$(SHUNIT2):
git submodule update --init vendor/shunit2
$(STUB_SH):
git submodule update --init vendor/stub.sh
2016-02-06 06:14:08 +08:00
.PHONY: clean
clean:
rm $(ALL_TARGETS)
2016-02-06 06:14:08 +08:00
.PHONY: test
2016-03-06 11:53:07 +08:00
test: all $(TEST_PREREQS)
script/test_runner.zsh $(TESTS)