From: Jim Meyering Date: Mon, 13 Aug 2001 20:11:03 +0000 (+0000) Subject: (unlocked-io.h): Do not append "_unlocked" twice. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dee827b24f41a703842de5d2dcedc3c7ab4688f6;p=pspp (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. --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 66fd74dbe6..6b1c76c5b7 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 $@