From c66bb89be2b6e76a0926b19f9726c91067e5bbf3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 10 Jul 2018 14:01:41 +0200 Subject: update template system --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 23169cf..2169170 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,12 @@ GENERATE = collect-wireless-mac.capsman collect-wireless-mac.local dhcp-lease-co all: $(GENERATE) -%.local: *.in Makefile - sed -e 's/%PATH%/interface wireless/' -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' < $(basename $@).in > $@ +%.local: *.template Makefile + sed -e '/\/ caps-man/d' -e 's|%PATH%|interface wireless|' -e 's|%TEMPL%|$(suffix $@)|' \ + -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ + < $(basename $@).template > $@ -%.capsman: *.in Makefile - sed -e 's/%PATH%/caps-man/' -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' < $(basename $@).in > $@ +%.capsman: *.template Makefile + sed -e '/\/ interface wireless/d' -e 's/%PATH%/caps-man/' -e 's/%TEMPL%/$(suffix $@)/' \ + -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ + < $(basename $@).template > $@ -- cgit v1.2.3-70-g09d2