summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index bd0b0d5..e1051de 100644
--- a/common.mk
+++ b/common.mk
@@ -9,7 +9,10 @@ pkglibexecdir ?= $(libexecdir)/libretools
# Usage: <INPUT $(edit) >OUTPUT
# Expand m4_include macros to use librelib
# This is used when using sources grabbed from devtools
-edit = sed -e 's|^\#!\s*/bin/bash|\#!/usr/bin/env bash|' -e 's|m4_include(lib/\(.*\))|. "$$(librelib \1)"|'
+edit = sed \
+ -e 's|^\#!\s*/bin/bash|\#!/usr/bin/env bash|' \
+ -e 's|m4_include(lib/\(.*\))|. "$$(librelib \1)"|' \
+ -e 's|@sysconfdir@|$(sysconfdir)|g'
# Usage: $(call indent,FILENAME)
# Command to auto-indent a file.
@@ -94,6 +97,10 @@ $(sort $(_do_patch)): %: %.ugly Makefile
%: %.in
@echo 'EDIT < $< > $@'; $(edit) <"$<" >"$@"
$(if $(filter-out %.sh,$@),chmod 755 "$@")
+# work-around for what I currently believe to be a regression in Make
+%.sh: %.sh.in
+ @echo 'EDIT < $< > $@'; $(edit) <"$<" >"$@"
+ $(if $(filter-out %.sh,$@),chmod 755 "$@")
# Build ########################################################################