2016-02-05 23:14:08 +01:00
|
|
|
SRC_DIR := ./src
|
2016-03-06 04:53:07 +01:00
|
|
|
VENDOR_DIR := ./vendor
|
2016-02-05 23:14:08 +01:00
|
|
|
|
2016-02-07 22:21:57 +01:00
|
|
|
SRC_FILES := \
|
2016-07-20 05:04:18 +02:00
|
|
|
$(SRC_DIR)/setup.zsh \
|
2016-02-05 23:14:08 +01:00
|
|
|
$(SRC_DIR)/config.zsh \
|
2016-07-20 05:04:18 +02:00
|
|
|
$(SRC_DIR)/util.zsh \
|
2017-01-27 00:35:33 +01:00
|
|
|
$(SRC_DIR)/features.zsh \
|
2016-02-05 23:14:08 +01:00
|
|
|
$(SRC_DIR)/deprecated.zsh \
|
|
|
|
$(SRC_DIR)/bind.zsh \
|
|
|
|
$(SRC_DIR)/highlight.zsh \
|
|
|
|
$(SRC_DIR)/widgets.zsh \
|
2016-03-01 20:45:55 +01:00
|
|
|
$(SRC_DIR)/strategies/*.zsh \
|
2016-07-20 05:04:18 +02:00
|
|
|
$(SRC_DIR)/async.zsh \
|
2016-02-05 23:14:08 +01:00
|
|
|
$(SRC_DIR)/start.zsh
|
|
|
|
|
2016-02-07 22:21:57 +01:00
|
|
|
HEADER_FILES := \
|
|
|
|
DESCRIPTION \
|
|
|
|
URL \
|
|
|
|
VERSION \
|
|
|
|
LICENSE
|
|
|
|
|
|
|
|
PLUGIN_TARGET := zsh-autosuggestions.zsh
|
|
|
|
|
2016-03-06 04:53:07 +01:00
|
|
|
SHUNIT2 := $(VENDOR_DIR)/shunit2/2.1.6
|
|
|
|
STUB_SH := $(VENDOR_DIR)/stub.sh/stub.sh
|
|
|
|
|
2017-01-19 08:59:26 +01:00
|
|
|
UNIT_TEST_PREREQS := \
|
2016-03-06 04:53:07 +01:00
|
|
|
$(SHUNIT2) \
|
|
|
|
$(STUB_SH)
|
|
|
|
|
2016-05-28 16:26:24 +02:00
|
|
|
all: $(PLUGIN_TARGET)
|
2016-02-07 22:21:57 +01:00
|
|
|
|
|
|
|
$(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES)
|
2016-02-13 21:42:02 +01:00
|
|
|
cat $(HEADER_FILES) | sed -e 's/^/# /g' > $@
|
2016-02-07 22:21:57 +01:00
|
|
|
cat $(SRC_FILES) >> $@
|
2016-02-05 23:14:08 +01:00
|
|
|
|
2016-03-06 04:53:07 +01:00
|
|
|
$(SHUNIT2):
|
|
|
|
git submodule update --init vendor/shunit2
|
|
|
|
|
|
|
|
$(STUB_SH):
|
|
|
|
git submodule update --init vendor/stub.sh
|
|
|
|
|
2016-02-05 23:14:08 +01:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2016-05-28 16:26:24 +02:00
|
|
|
rm $(PLUGIN_TARGET)
|
2016-02-05 23:14:08 +01:00
|
|
|
|
|
|
|
.PHONY: test
|
2017-01-19 08:59:26 +01:00
|
|
|
test: rspec unit_test
|
|
|
|
|
|
|
|
unit_test: all $(UNIT_TEST_PREREQS)
|
|
|
|
script/test_runner.zsh $(UNIT_TESTS)
|
|
|
|
|
|
|
|
rspec: all
|
|
|
|
bundle exec rspec $(RSPEC_TESTS)
|