1 scripts
= $(shell find .
-maxdepth
1 -name \
*.sh
-type f
)
2 templates
= $(shell find templates
-maxdepth
1 -type f
-printf
"%f\n")
3 units
= $(shell find
-maxdepth
1 -name \
*.service
-or
-name \
*.timer
)
4 export prefix ?
= /usr
/local
8 cat
$(2) | envsubst
> $(1)
19 install: $(scripts
) $(units
)
20 install -D
-t
$(prefix)/bin
$(scripts
)
21 install -D
-t
$(prefix)/lib
/systemd
/system
$(units
)
22 install -D
-t
$(prefix)/lib
/systemd
/user
$(units
)
25 $(foreach _tmpl
,$(templates
),$(eval
$(call TEMPLATE_RULE
,$(_tmpl
),templates
/$(_tmpl
))))