Files
tmux-themepack/Makefile
Jim Myhrberg ba8616db4c feat: Make all themes easily user-customizable
This is achieved by using custom @-prefixed tmux options which are set
with the `-o` option, meaning, the theme will only set the value if it
is not already set.

This allows users to override any of the options in the theme by simply
setting them before loading the theme.

Additionally all themes are now generated using a custom theme builder,
that allows sharing various parts of themes between them easily.
2019-12-22 10:27:04 +00:00

32 lines
667 B
Makefile

BUILDER := bin/build-theme
THEME_SRC := $(shell find src -name '*.tmuxtheme')
INCLUDES := $(shell find src -name '*.tmuxsh')
THEMES := $(patsubst src/%,%,$(THEME_SRC))
TESTS := $(addsuffix .test,$(THEMES))
.PHONY: build
build: $(THEMES)
.PHONY: clean
clean:
rm $(shell find * -name "*.tmuxtheme" -not -path "src/*")
.PHONY: lint
lint:
cd test && golangci-lint run -v
.PHONY: test
test: needs-build
cd test && go test -v ./...
.PHONY: needs-build
needs-build:
$(foreach file,$(THEMES), \
$(BUILDER) "src/$(file)" | diff -q "$(file)" - && \
) true
$(THEMES): %.tmuxtheme: src/%.tmuxtheme $(INCLUDES)
$(BUILDER) "src/$@" "$@"
$(TESTS): %.test: src/%.test