From: Nick Bowler Date: Mon, 4 Dec 2023 03:57:38 +0000 (-0500) Subject: Use awk over printf when generating atlocal. X-Git-Tag: v1.3~71 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/9f003ff99e099ddfe8b8a4af08a447d990705778?hp=90eaf19d63952c7df0239dcd7c6c09b4292aa575 Use awk over printf when generating atlocal. We use awk extensively already and it will do the job here. SVr4 printf does not implement the POSIX behaviour of repeating the output when there are more arguments than needed for the given format string. --- diff --git a/Makefile.am b/Makefile.am index 58ec75e..87cf0bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -334,12 +334,9 @@ EXTRA_DIST += $(GPERFFILES) src/gperf-wordwrap.awk $(GPERFFILES:.gperf=.c): $(srcdir)/src/gperf-wordwrap.awk atlocal: config.status - $(AM_V_GEN) :; { \ - printf ': "$${%s=%s}"\n' \ - AWK '$(AWK)' \ - EXEEXT '$(EXEEXT)' \ - check_PROGRAMS '$(check_PROGRAMS)' \ - ; } >$@.tmp + $(AM_V_GEN) $(AWK) $@.tmp \ + 'BEGIN{ for (i = 1; i < ARGC; i++) print ": \"$${" ARGV[i] "}\""; }' \ + 'AWK=$(AWK)' 'EXEEXT=$(EXEEXT)' 'check_PROGRAMS=$(check_PROGRAMS)' $(AM_V_at) mv -f $@.tmp $@ check_DATA = atlocal CLEANFILES += atlocal