mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
31 lines
783 B
Makefile
31 lines
783 B
Makefile
SOURCE_FILES ?= $(filter-out CVS .git Makefile %.done, $(wildcard *))
|
|
TARGET_DIR ?= $(PREFIX)/share
|
|
TARGET_MODE ?= 440
|
|
TARGET_OWNER ?= root
|
|
TARGET_GROUP ?= root
|
|
TARGET_DIR_MODE ?= 770
|
|
TARGET_DIR_OWNER ?= root
|
|
TARGET_DIR_GROUP ?= root
|
|
SOURCE_BASE ?= .
|
|
|
|
include $(MODDIR)/make/defs.mk
|
|
|
|
all:
|
|
install: install.done
|
|
clean: done.clean
|
|
distclean:
|
|
|
|
done.clean:
|
|
$(RM) -f *.done
|
|
|
|
install.done:
|
|
for f in $(SOURCE_FILES); do \
|
|
relpath=`realpath $$f --relative-to $(SOURCE_BASE)` ;\
|
|
if [ -d $$f ]; then \
|
|
$(INSTALL) -d -D -m $(TARGET_DIR_MODE) -o $(TARGET_DIR_OWNER) -g $(TARGET_DIR_GROUP) $(TARGET_DIR)/$$relpath ;\
|
|
else \
|
|
$(INSTALL) -p -D -m $(TARGET_MODE) -o $(TARGET_OWNER) -g $(TARGET_GROUP) $$f $(TARGET_DIR)/$$relpath ;\
|
|
fi ;\
|
|
done
|
|
touch $@
|
|
|