2016-02-05 23:14:08 +01:00
|
|
|
SRC_DIR := ./src
|
|
|
|
SCRIPT_DIR := ./script
|
|
|
|
|
2016-02-07 22:21:57 +01:00
|
|
|
SRC_FILES := \
|
2016-02-05 23:14:08 +01: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 \
|
2016-03-01 20:45:55 +01:00
|
|
|
$(SRC_DIR)/strategies/*.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-02-07 22:18:49 +01:00
|
|
|
OH_MY_ZSH_LINK_TARGET := zsh-autosuggestions.plugin.zsh
|
2016-02-07 22:21:57 +01:00
|
|
|
|
|
|
|
ALL_TARGETS := \
|
2016-02-07 22:18:49 +01:00
|
|
|
$(PLUGIN_TARGET) \
|
|
|
|
$(OH_MY_ZSH_LINK_TARGET)
|
2016-02-07 22:21:57 +01:00
|
|
|
|
2016-03-01 22:57:10 +01:00
|
|
|
TEST_FILES := \
|
|
|
|
$(SCRIPT_DIR)/test*.zsh
|
|
|
|
|
2016-02-07 22:21:57 +01:00
|
|
|
all: $(ALL_TARGETS)
|
|
|
|
|
|
|
|
$(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-02-07 22:18:49 +01:00
|
|
|
$(OH_MY_ZSH_LINK_TARGET): $(PLUGIN_TARGET)
|
|
|
|
ln -s $(PLUGIN_TARGET) $@
|
|
|
|
|
2016-02-05 23:14:08 +01:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2016-02-07 22:21:57 +01:00
|
|
|
rm $(ALL_TARGETS)
|
2016-02-05 23:14:08 +01:00
|
|
|
|
|
|
|
.PHONY: test
|
2016-02-07 22:21:57 +01:00
|
|
|
test: all
|
2016-03-01 22:57:10 +01:00
|
|
|
@for test_file in $(TEST_FILES); do \
|
|
|
|
echo "\nRunning $$test_file"; \
|
|
|
|
$$test_file; \
|
|
|
|
done
|