aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/Makefile.am
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/statistics/Makefile.am
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/statistics/Makefile.am')
-rw-r--r--src/statistics/Makefile.am6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/statistics/Makefile.am b/src/statistics/Makefile.am
index 6d69d58d8..52f382156 100644
--- a/src/statistics/Makefile.am
+++ b/src/statistics/Makefile.am
@@ -84,15 +84,13 @@ check_SCRIPTS = \
84 test_gnunet_statistics.py 84 test_gnunet_statistics.py
85endif 85endif
86 86
87do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
88
89SUFFIXES = .py.in .py 87SUFFIXES = .py.in .py
90.py.in.py: 88.py.in.py:
91 $(do_subst) < $(srcdir)/$< > $@ 89 $(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)/$< > $@
92 chmod +x $@ 90 chmod +x $@
93 91
94test_gnunet_statistics.py: test_gnunet_statistics.py.in Makefile 92test_gnunet_statistics.py: test_gnunet_statistics.py.in Makefile
95 $(do_subst) < $(srcdir)/test_gnunet_statistics.py.in > test_gnunet_statistics.py 93 $(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_statistics.py.in > test_gnunet_statistics.py
96 chmod +x test_gnunet_statistics.py 94 chmod +x test_gnunet_statistics.py
97 95
98EXTRA_DIST = \ 96EXTRA_DIST = \