aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-07-10 14:01:41 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-07-10 14:01:41 +0200
commitc66bb89be2b6e76a0926b19f9726c91067e5bbf3 (patch)
tree3f5d48114541e98ea4ab8e4795b76df2242e9de6 /Makefile
parenta964e8ad0cb285e5b3c13da37ffe567175263acc (diff)
update template system
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
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 > $@