home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / utils / bug / 2467 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tori.TWinsun.COM!junio
  2. From: junio@tori.TWinsun.COM (Jun Hamano)
  3. Newsgroups: gnu.utils.bug
  4. Subject: autoheader (autoconf 1.3)
  5. Date: 25 Jan 1993 21:13:24 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 49
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gnu-utils@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301251921.AA01130@tori.twinsun.com>
  12.  
  13. Earlier, I reported that autheader fails to parse m4 output
  14. because of incompatibility between traditional `sed' and GNU sed.
  15. Namely, for '/pattern1/,/pattern2/' construct, traditional sed
  16. sometimes doesn't consider it is the end of range if both
  17. patterns appear on the same line.  This patch works around this
  18. problem and should work with both traditional and GNU sed.
  19.  
  20. There is another sed related problem in autoheader.sh.
  21. Traditional sed doesn't like the following construct (attempt to
  22. replace something with a newline):
  23.  
  24. sed 's/foo/
  25. /g'
  26.  
  27. -- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ----
  28. $ rcsdiff -c3 -r1.1 autoheader.sh
  29. ===================================================================
  30. RCS file: autoheader.sh,v
  31. retrieving revision 1.1
  32. diff -c3 -r1.1 autoheader.sh
  33. *** autoheader.sh    1993/01/25 19:06:06    1.1
  34. --- autoheader.sh    1993/01/25 19:06:57
  35. ***************
  36. *** 63,69 ****
  37.   # autoconf processing of the input file.
  38.   eval "`echo \"$frob\" \
  39.          | m4 $MACROFILES - $infile \
  40. !        | sed -n '/^@@@/,/@@@$/s/^@*\([^@]*\)@*$/\1/p'`"
  41.   
  42.   # Make SYMS newline-separated rather than blank-separated.
  43.   syms="`for sym in $syms; do echo $sym; done`"
  44. --- 63,77 ----
  45.   # autoconf processing of the input file.
  46.   eval "`echo \"$frob\" \
  47.          | m4 $MACROFILES - $infile \
  48. !        | sed -n -e '
  49. !         : again
  50. !         /^@@@.*@@@$/s/@@@\(.*\)@@@$/\1/p
  51. !         /^@@@/{
  52. !             s/^@@@//p
  53. !             n
  54. !             s/^/@@@/
  55. !             b again
  56. !         }'`"
  57.   
  58.   # Make SYMS newline-separated rather than blank-separated.
  59.   syms="`for sym in $syms; do echo $sym; done`"
  60.  
  61.  
  62.