Have directory be created first in makefile install rules
See: https://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
This commit is contained in:
parent
439389db4d
commit
cbf188cd3d
1 changed files with 4 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -11,12 +11,12 @@ lib := $(patsubst matrix/%.py, $(DESTDIR)$(PREFIX)/python/matrix/%.py, \
|
||||||
help:
|
help:
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
install: install-dir install-lib ## Install the plugin to $(DESTDIR)/$(PREFIX)
|
install: install-lib | $(DESTDIR)$(PREFIX)/python/matrix/ ## Install the plugin to $(DESTDIR)/$(PREFIX)
|
||||||
install -m644 main.py $(DESTDIR)$(PREFIX)/python/matrix.py
|
install -m644 main.py $(DESTDIR)$(PREFIX)/python/matrix.py
|
||||||
|
|
||||||
install-lib: $(lib)
|
install-lib: $(lib)
|
||||||
install-dir:
|
$(DESTDIR)$(PREFIX)/python/matrix/:
|
||||||
install -d $(DESTDIR)$(PREFIX)/python/matrix
|
install -d $@
|
||||||
|
|
||||||
uninstall: ## Uninstall the plugin from $(PREFIX)
|
uninstall: ## Uninstall the plugin from $(PREFIX)
|
||||||
rm $(DESTDIR)$(PREFIX)/python/matrix.py $(DESTDIR)$(PREFIX)/python/matrix/*
|
rm $(DESTDIR)$(PREFIX)/python/matrix.py $(DESTDIR)$(PREFIX)/python/matrix/*
|
||||||
|
@ -24,7 +24,7 @@ uninstall: ## Uninstall the plugin from $(PREFIX)
|
||||||
|
|
||||||
phony:
|
phony:
|
||||||
|
|
||||||
$(DESTDIR)$(PREFIX)/python/matrix/%.py: matrix/%.py phony
|
$(DESTDIR)$(PREFIX)/python/matrix/%.py: matrix/%.py phony | $(DESTDIR)$(PREFIX)/python/matrix/
|
||||||
install -m644 $< $@
|
install -m644 $< $@
|
||||||
|
|
||||||
test: ## Run automated tests
|
test: ## Run automated tests
|
||||||
|
|
Loading…
Add table
Reference in a new issue