summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-10-01 03:16:30 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-10-01 03:16:30 -0400
commit9b6b6dad291e2d62a957a38ace952d98147a83d2 (patch)
tree1e3e37af8a9d693d0cb749999aaaef095bb7876c /common.mk
parent051a269d2ff56d5ab01301c965a7f7d0799bc441 (diff)
conf.sh: don't hardcode /etc, get it during build from $(sysconfdir)
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 ########################################################################