mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the point. Signed-off-by: Jan Lindemann <jan@janware.com>
39 lines
1.6 KiB
Makefile
39 lines
1.6 KiB
Makefile
ifneq ($(DEVELOPMENT),true)
|
|
SUBTREE_OWNER ?= root
|
|
SUBTREE_GROUP ?= root
|
|
SUBTREE_MODE ?= 0644
|
|
SUBTREE_DIROWNER ?= root
|
|
SUBTREE_DIRGROUP ?= root
|
|
SUBTREE_DIRMODE ?= 0755
|
|
else
|
|
SUBTREE_OWNER ?= $(shell id -un)
|
|
SUBTREE_GROUP ?= $(shell id -gn)
|
|
SUBTREE_MODE ?= 0644
|
|
SUBTREE_DIROWNER ?= $(shell id -un)
|
|
SUBTREE_DIRGROUP ?= $(shell id -gn)
|
|
SUBTREE_DIRMODE ?= 0755
|
|
SUBTREE_INSTALL_PREFIX ?= /srv/www/proj/$(PROJECT)
|
|
endif
|
|
|
|
#ifeq ($(SUBTREE_SRC),)
|
|
# SUBTREE_SRC = $(shell find .)
|
|
#endif
|
|
|
|
SUBTREE_DIRS += $(shell for f in `git ls-files . 2>/dev/null || find | sed 's%/[^/]\+$$%%' | sort -u | grep -v "Makefile\|GNUmakefile"`; do if [ -d "$$f" ]; then echo $$f; fi; done)
|
|
SUBTREE_FILES += $(shell for f in `git ls-files . 2>/dev/null || find | grep -v "Makefile\|GNUmakefile"`; do if [ -f "$$f" ]; then echo $$f; fi; done)
|
|
|
|
INSTALLED_SUBTREE_DIRS = $(addprefix $(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_DIRS))
|
|
INSTALLED_SUBTREE_FILES = $(addprefix $(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/,$(SUBTREE_FILES))
|
|
|
|
include $(JWBDIR)/make/defs.mk
|
|
|
|
all:
|
|
install: $(INSTALLED_SUBTREE_DIRS) $(INSTALLED_SUBTREE_FILES)
|
|
clean:
|
|
distclean:
|
|
|
|
$(INSTALLED_SUBTREE_DIRS):
|
|
$(INSTALL) -d -o $(SUBTREE_DIROWNER) -g $(SUBTREE_DIRGROUP) -m $(SUBTREE_DIRMODE) $@
|
|
|
|
$(ENV_PREFIX)$(SUBTREE_INSTALL_PREFIX)/%: % | $(INSTALLED_SUBTREE_DIRS)
|
|
$(INSTALL) -p -o $(SUBTREE_OWNER) -g $(SUBTREE_GROUP) -m $(SUBTREE_MODE) $< $@
|