From 269f95aef745319bde1ba4875212569fa14dccaf Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 13 Aug 2001 20:11:03 +0000 Subject: [PATCH] (unlocked-io.h): Do not append "_unlocked" twice. Port to Solaris 8, where 'sed' requires a space after the 'r' command, and where sh dislikes "$/". Clean up the spacing a bit. Redirect output to $tmp just once. --- lib/Makefile.am | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 66fd74d..6b1c76c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -176,17 +176,15 @@ A_Z=ABCDEFGHIJKLMNOPQRSTUVWXYZ unlocked-io.h: $(srcdir)/unlocked-io.hin Makefile.am tmp=t$$$$; \ - echo > $$tmp; \ - for b in $(io_functions); do \ - f=$${b}_unlocked; \ + for f in $(io_functions); do \ u=`echo $$f|tr $(a_z) $(A_Z)`; \ - echo "# if HAVE_$${u}_UNLOCKED" >> $$tmp; \ - echo "# undef $$f" >> $$tmp; \ - echo "# define $$f(S) $${f}_unlocked (S)" >> $$tmp; \ - echo '#endif' >> $$tmp; \ - done; \ - sed "/^@replace_this@$$/r$$tmp" $(srcdir)/unlocked-io.hin \ - | sed "/^@replace_this@$$/d" \ + echo "# if HAVE_$${u}_UNLOCKED" ; \ + echo "# undef $$f" ; \ + echo "# define $$f(S) $${f}_unlocked (S)" ; \ + echo '# endif' ; \ + done > $$tmp; \ + sed '/^@replace_this@\$$/r '$$tmp $(srcdir)/unlocked-io.hin \ + | sed '/^@replace_this@$$/d' \ > $@t; \ rm -f $$tmp; \ mv $@t $@ -- 2.7.4