sysconfdir ?= /etc ETC_FILES = $(filter-out Makefile , $(wildcard *)) ETC_INSTALLABLES = $(patsubst %, $(DESTDIR)$(sysconfdir)/%, $(ETC_FILES)) INSTALLABLES = $(ETC_INSTALLABLES) .PHONY: install install: $(INSTALLABLES) $(DESTDIR)$(sysconfdir)/%: % install -D -m 0600 $< $@