contrib/scripts and gnunet-logread: reduce code used for output.
authorng0 <ng0@n0.is>
Thu, 12 Dec 2019 00:11:02 +0000 (00:11 +0000)
committerng0 <ng0@n0.is>
Thu, 12 Dec 2019 00:11:02 +0000 (00:11 +0000)
contrib/scripts/Makefile.am
contrib/scripts/gnunet-logread/Makefile.am

index f8b7ec3d1fe53772d3ea02b02742086bf80713ce..bbb9e6d67d92790c3c2583d09416e32fd07f0832 100644 (file)
@@ -52,11 +52,11 @@ CLEANFILES = \
 SUFFIXES = .py.in .py
 
 .py.in.py:
-       $(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 < $< > $@
+       $(AWK) -v py="$(PYTHON)" -f $(top_srcdir)/bin/dosubst.awk < $< > $@
        chmod +x $@
 
 if HAVE_AWK
 check-texinfo.awk: check-texinfo.awk.in Makefile
-       $(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)/check-texinfo.awk.in > check-texinfo.awk
+       $(AWK) -v awkay="$(AWK_BINARY)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/check-texinfo.awk.in > check-texinfo.awk
        chmod +x check-texinfo.awk
 endif
index aa92dfe167a1cd299c32943d707daf1ddb4e8423..d0054391cd108dfa69a9ccc14372ee592eac18d1 100644 (file)
@@ -1,16 +1,14 @@
 # This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
 
-do_subst = $(AWK) -v prl="$(PERL)" -v pfx="$(prefix)" '{if (/@SUBSTPREFIX@/) { gsub("@SUBSTPREFIX@",pfx)}; gsub("@PERLEXE@",prl); print $$0}'
-
 SUFFIXES = .in
 
 gnunet-logread: gnunet-logread.in Makefile
-       $(do_subst) < $(srcdir)/gnunet-logread.in > gnunet-logread
+       $(AWK) -v prl="$(PERL)" -v pfx="$(prefix)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet-logread.in > gnunet-logread
        chmod +x gnunet-logread
 
 gnunet-logread-ipc-sdedit: gnunet-logread-ipc-sdedit.in Makefile
-       $(do_subst) < $(srcdir)/gnunet-logread-ipc-sdedit.in > gnunet-logread-ipc-sdedit
+       $(AWK) -v prl="$(PERL)" -f $(top_srcdir)/bin/dosubst.awk < $(srcdir)/gnunet-logread-ipc-sdedit.in > gnunet-logread-ipc-sdedit
        chmod +x gnunet-logread-ipc-sdedit
 
 CLEANFILES=    \