jw-pkg/make/tmpl.mk
Jan Lindemann ca5910d423 tmpl.mk: Re-add because it's useful
Templates (i.e. text files ending as .tmpl) are not part of jw-pkg
anylonger, but controlling the way they are installed is beneficial
to other packages, so add tmpl.mk back.

That said, the variable names will need some tweaking to avoid
collisions. Postponed.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-23 11:07:37 +01:00

22 lines
664 B
Makefile

include $(JWBDIR)/make/defs.mk
# -- TMPL
INSTALLATION_FILE_TYPES += TMPL
BUILD_TMPLDIR = $(TOPDIR)/tmpl
LOCAL_TMPL += $(filter-out $(DONT_INSTALL),$(wildcard *.tmpl))
ifndef TMPL_SUBDIR
TMPL_SUBDIR := $(shell $(PWD) | $(SED) '/.*\/tmpl\(\/\|$$\)/!d; s%.*/tmpl\(/\|$$\)%%')
endif
ifeq ($(TMPL_SUBDIR),)
INSTALL_TMPLDIR = $(PROJECT_TMPLDIR)
else
INSTALL_TMPLDIR = $(PROJECT_TMPLDIR)/$(TMPL_SUBDIR)
endif
INSTALLED_TMPL += $(addprefix $(INSTALL_TMPLDIR)/,$(LOCAL_TMPL))
include $(JWBDIR)/make/rules.mk
all:
install: install_TMPL
clean: textclean localclean doneclean
test: