# Copyright 2016 Luke Shumaker # License: WTFPLv2 PACKAGE = httpconnectd VERSION = 20161004 pkgconfdir = $(sysconfdir)/httpconnectd Q = @ ######################################################################## MAKEFLAGS += -r topsrcdir ?= . topoutdir ?= . include $(topsrcdir)/build-aux/Makefile.head.mk files.out.all += httpconnectd httpconnectd@.service # httpconnectd.socket files.out.all += httpsconnectd httpsconnectd.service files.out.int += *.sh files.sys.all += $(bindir)/httpconnectd $(systemddir)/httpconnectd@.service $(systemddir)/httpconnectd.socket files.sys.all += $(bindir)/httpsconnectd $(systemddir)/httpsconnectd.service $(pkgconfdir)/https.conf files.sys.all += $(pkgconfdir)/basicauth.conf-sample httpconnectd@.service: .var.bindir httpconnectd.sh: .var.pkgconfdir httpsconnectd.service: .var.bindir httpsconnectd.sh: .var.pkgconfdir %: %.sh install -m755 $< $@ vars = $(patsubst .var.%,%,$(filter .var.%,$^)) %: %.in $(if $(Q),$(Q)echo 'EDIT < $< > $@';)$(if $(vars),sed $(foreach v,$(vars), -e 's|@$(v)@|$($(v))|g' ),cat) < $< > $@ $(DESTDIR)$(bindir)/%: % install -Dm755 $< $@ $(DESTDIR)$(systemddir)/%: % install -Dm644 $< $@ $(DESTDIR)$(pkgconfdir)/%: % install -Dm644 $< $@ .DELETE_ON_ERROR: .SECONDARY: include $(topsrcdir)/build-aux/Makefile.tail.mk