Makefile: drop path rewriting, use pattern to filter

This commit is contained in:
Christian Hesse 2023-08-07 14:37:52 +02:00
parent c37739c2f6
commit 1b947f445b
5 changed files with 46 additions and 31 deletions

View file

@ -15,12 +15,12 @@ all: $(CAPSMAN) $(LOCAL) $(HTML)
markdown $< | sed 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' > $@
%.local.rsc: %.template.rsc Makefile
sed -e '/\/caps-man/d' -e 's|%PATH%|interface\/wireless|' -e 's|%TEMPL%|.local|' \
sed -e '/\/caps-man/d' -e 's|%TEMPL%|.local|' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
%.capsman.rsc: %.template.rsc Makefile
sed -e '/\/interface\/wireless/d' -e 's|%PATH%|caps-man|' -e 's|%TEMPL%|.capsman|' \
sed -e '/\/interface\/wireless/d' -e 's|%TEMPL%|.capsman|' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@