]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 262422 via svnmerge from
authorJason Parker <jparker@digium.com>
Tue, 11 May 2010 19:58:14 +0000 (19:58 +0000)
committerJason Parker <jparker@digium.com>
Tue, 11 May 2010 19:58:14 +0000 (19:58 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r262422 | qwell | 2010-05-11 14:57:24 -0500 (Tue, 11 May 2010) | 18 lines

  Merged revisions 262421 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines

    Use a less silly method for modifying a flex-generated file.

    The sed syntax that was used wasn't actually valid, causing some versions to
    choke.  This is the method that is used in 1.6.x+ for similar changes.

    (closes issue #16696)
    Reported by: bklang
    Patches:
          16696-sedfix.diff uploaded by qwell (license 4)
    Tested by: qwell
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@262424 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/Makefile

index a0c750e43a150912eda504aa1740c02c99dd863d..2c156e723f99c1c3924cf5a81486ca56bc1a3b6b 100644 (file)
@@ -49,8 +49,12 @@ else
 ael/ael_lex.c:
 endif
        $(ECHO_PREFIX) echo "   [FLEX] $< -> $@"
-       $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex; sed -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c > zz; mv zz ael_lex.c)
-       $(CMD_PREFIX) (cd ael; sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ael_lex.c > zz; mv zz ael_lex.c)
+       $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex)
+       $(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix
+       $(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@
+       $(CMD_PREFIX) echo >> $@
+       $(CMD_PREFIX) cat $@.fix >> $@
+       $(CMD_PREFIX) rm $@.fix
 
 ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
 ael/ael.tab.c ael/ael.tab.h: ael/ael.y