2014-07-21 10:33:39 +00:00
|
|
|
SUBTREE_OWNER ?= root
|
|
|
|
|
SUBTREE_GROUP ?= root
|
|
|
|
|
SUBTREE_MODE ?= 0644
|
|
|
|
|
SUBTREE_DIROWNER ?= root
|
|
|
|
|
SUBTREE_DIRGROUP ?= root
|
|
|
|
|
SUBTREE_DIRMODE ?= 0755
|
2014-07-21 10:37:51 +00:00
|
|
|
SUBTREE_INSTALL_PREFIX ?= /srv/www/proj/$(PROJECT)
|
2014-07-21 10:33:39 +00:00
|
|
|
|
|
|
|
|
SUBTREE_DIRS = $(shell for f in `git ls-files . | sed 's%/[^/]\+$$%%' | sort -u | grep -v Makefile`; do if [ -d "$$f" ]; then echo $$f; fi; done)
|
|
|
|
|
SUBTREE_FILES = $(shell for f in `git ls-files . | grep -v Makefile`; do if [ -f "$$f" ]; then echo $$f; fi; done)
|
|
|
|
|
INSTALLED_SUBTREE_DIRS = $(addprefix $(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_DIRS))
|
|
|
|
|
INSTALLED_SUBTREE_FILES = $(addprefix $(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_FILES))
|
|
|
|
|
|
|
|
|
|
include $(MODDIR)/make/defs.mk
|
|
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
install: $(INSTALLED_SUBTREE_DIRS) $(INSTALLED_SUBTREE_FILES)
|
|
|
|
|
clean:
|
|
|
|
|
distclean:
|
|
|
|
|
|
|
|
|
|
$(INSTALLED_SUBTREE_DIRS):
|
2014-07-21 10:37:51 +00:00
|
|
|
$(INSTALL) -d -o $(SUBTREE_DIROWNER) -g $(SUBTREE_DIRGROUP) -m $(SUBTREE_DIRMODE) $@
|
2014-07-21 10:33:39 +00:00
|
|
|
|
|
|
|
|
$(SUBTREE_INSTALL_PREFIX)/%: %
|
2014-07-21 10:37:51 +00:00
|
|
|
$(INSTALL) -o $(SUBTREE_OWNER) -g $(SUBTREE_GROUP) -m $(SUBTREE_MODE) $< $@
|
2014-07-21 10:33:39 +00:00
|
|
|
|