aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-11 19:55:42 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-11 19:55:42 +0000
commitb179b62a46cab844e9f294705a3aec0f12bfe08d (patch)
tree6a63ac946e9f8078392beed2af70b92a2fe0e541
parente3b7e2eea498412d94d263260ef351ec428052ee (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@262421 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--pbx/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/pbx/Makefile b/pbx/Makefile
index be79b26bd..3ed3d9e5a 100644
--- a/pbx/Makefile
+++ b/pbx/Makefile
@@ -50,8 +50,12 @@ else
ael/ael_lex.c:
endif
$(ECHO_PREFIX) echo " [FLEX] $< -> $@"
- $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" 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