summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 02:30:15 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 02:34:26 -0500
commitfc699adadba640164cf28335e1f89ce05b596ee4 (patch)
treeee3cf654465518470296fd59369f50591ca5102c /Makefile
parent2a6a7399f334f84d6c8665056d383b18222b452c (diff)
Have webuser be a compile-time config rather than run-time.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index acb7252..2f647a0 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,8 @@ uwsgidir = /etc/uwsgi
pkglibexecdir = $(libexecdir)/parabolaweb-utils
pkgconffile = $(sysconfdir)/parabolaweb
+webuser = parabolaweb
+
CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter
CPPFLAGS += -DSCRIPT_LOCATION='"$(pkglibexecdir)/parabolaweb-changepassword.real"'
@@ -36,8 +38,8 @@ files.sys.all = $(targets)
# Pattern rules
-%: %.in .var.sbindir .var.pkgconffile
- sed -e 's|@sbindir@|$(sbindir)|' -e 's|@pkgconffile@|$(pkgconffile)|' < $< > $@
+%: %.in .var.sbindir .var.pkgconffile .var.webuser
+ sed $(foreach v,$(patsubst .var.%,%,$(filter .var.%,$^)), -e 's|@$v@|$($v)|' ) < $< > $@
$(DESTDIR)$(sbindir)/%: %
install -Dm755 $< $@