aboutsummaryrefslogtreecommitdiff
path: root/src/gns/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/gns/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/gns/Makefile.am')
-rw-r--r--src/gns/Makefile.am9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 9f0e0bbb6..abd5d5b48 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -103,17 +103,12 @@ plugin_LTLIBRARIES = \
103bin_SCRIPTS = \ 103bin_SCRIPTS = \
104 gnunet-gns-proxy-setup-ca 104 gnunet-gns-proxy-setup-ca
105 105
106# See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts
107do_subst = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
108
109gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile 106gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile
110 $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca 107 $(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)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
111 @chmod +x gnunet-gns-proxy-setup-ca 108 @chmod +x gnunet-gns-proxy-setup-ca
112 109
113do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
114
115test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile 110test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile
116 $(do_subst_pkgdatadir) < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh 111 $(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_gns.sh.in > test_gnunet_gns.sh
117 @chmod +x test_gnunet_gns.sh 112 @chmod +x test_gnunet_gns.sh
118 113
119CLEANFILES = test_gnunet_gns.sh 114CLEANFILES = test_gnunet_gns.sh