Mercurial > hg > octave-lyh > gnulib-hg
changeset 3347:88a13e1808ec
(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.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 13 Aug 2001 20:11:03 +0000 |
parents | b3660313d1e9 |
children | 04b412b06d37 |
files | lib/Makefile.am |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -176,17 +176,15 @@ 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 $@