mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
subtree.mk: Add file
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
5d1c011ad4
commit
0f3c8aa60c
1 changed files with 26 additions and 0 deletions
26
make/subtree.mk
Normal file
26
make/subtree.mk
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
SUBTREE_OWNER ?= root
|
||||
SUBTREE_GROUP ?= root
|
||||
SUBTREE_MODE ?= 0644
|
||||
SUBTREE_DIROWNER ?= root
|
||||
SUBTREE_DIRGROUP ?= root
|
||||
SUBTREE_DIRMODE ?= 0755
|
||||
SUBTREE_INSTALL_PREFIX = /tmp/blah
|
||||
|
||||
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):
|
||||
@echo $(INSTALL) -d -o $(SUBTREE_DIROWNER) -g $(SUBTREE_DIRGROUP) -m $(SUBTREE_DIRMODE) $@
|
||||
|
||||
$(SUBTREE_INSTALL_PREFIX)/%: %
|
||||
@echo $(INSTALL) -o $(SUBTREE_OWNER) -g $(SUBTREE_GROUP) -m $(SUBTREE_MODE) $< $@
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue