summaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
committerng0 <ng0@n0.is>2019-12-02 15:30:56 +0000
commitc8e5e28048dd9605f7958ef95f2a6dd626658069 (patch)
tree52375a14cc93c4161a658b4c7a1926dda11d8909 /src/consensus
parent53f35813d89de6f7c91883277129ffda3ca5b772 (diff)
rewrite sed logic used in Makefiles and move into dosubst awk script.
include 'bin' and its files in dist files, this is where dosubst is located. While the invocation (passing of the variables) is not optimal (yet, will be changed), this will in the end allow sharing code between Makefiles better, and maybe drop sed usage in the future.
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/Makefile.am4
-rw-r--r--src/consensus/consensus-simulation.py.in2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/consensus/Makefile.am b/src/consensus/Makefile.am
index 4ad224aa3..24e685fb9 100644
--- a/src/consensus/Makefile.am
+++ b/src/consensus/Makefile.am
@@ -23,12 +23,10 @@ libexec_PROGRAMS += \
gnunet-service-evil-consensus
endif
-do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
-
SUFFIXES = .py.in .py
.py.in.py:
- $(do_subst) < $< > $@
+ $(AWK) -v bdir="$(bindir)" -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" -v pfx="$(prefix)" -v prl="$(PERL)" -v sysconfdirectory="$(sysconfdir)" -v pkgdatadirectory="$(pkgdatadir)" -f $(top_srcdir)/bin/dosubst.awk < $< > $@
chmod +x $@
check-python-style:
diff --git a/src/consensus/consensus-simulation.py.in b/src/consensus/consensus-simulation.py.in
index c6b97e63f..272a52da2 100644
--- a/src/consensus/consensus-simulation.py.in
+++ b/src/consensus/consensus-simulation.py.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
# This file is part of GNUnet
# (C) 2013, 2018 Christian Grothoff (and other contributing authors)
#