aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
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/peerinfo-tool
parent53f35813d89de6f7c91883277129ffda3ca5b772 (diff)
downloadgnunet-c8e5e28048dd9605f7958ef95f2a6dd626658069.tar.gz
gnunet-c8e5e28048dd9605f7958ef95f2a6dd626658069.zip
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/peerinfo-tool')
-rw-r--r--src/peerinfo-tool/Makefile.am4
-rwxr-xr-xsrc/peerinfo-tool/test_gnunet_peerinfo.py.in2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index 8a2efba63..05173d551 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -56,10 +56,8 @@ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PAT
56TESTS = $(check_SCRIPTS) 56TESTS = $(check_SCRIPTS)
57endif 57endif
58 58
59do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
60
61test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile 59test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile
62 $(do_subst) < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py 60 $(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 < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py
63 chmod +x test_gnunet_peerinfo.py 61 chmod +x test_gnunet_peerinfo.py
64 62
65EXTRA_DIST = \ 63EXTRA_DIST = \
diff --git a/src/peerinfo-tool/test_gnunet_peerinfo.py.in b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
index 5d9daa930..9a87d3649 100755
--- a/src/peerinfo-tool/test_gnunet_peerinfo.py.in
+++ b/src/peerinfo-tool/test_gnunet_peerinfo.py.in
@@ -1,4 +1,4 @@
1#!@PYTHON@ 1#!@PYTHONEXE@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2010, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
4# 4#