summaryrefslogtreecommitdiffstats
path: root/textproc/iiimf-le-unit/files/patch-leif_unit_phonetic_mapfile_Makefile.am
blob: 59e9f0c8843d73c5753c863aeef9d2a6931003a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- leif/unit/phonetic_im/mapfile/Makefile.am.orig	Sat Apr  3 11:50:21 2004
+++ leif/unit/phonetic_im/mapfile/Makefile.am	Wed Mar  2 20:35:05 2005
@@ -1,5 +1,6 @@
 SUBDIRS = mapfile2c
 LEX = /usr/bin/lex
+SED = /usr/bin/sed
 
 MAPFILES = bengali.mapfile gurmukhi.mapfile hindi.mapfile kannada.mapfile malayalam.mapfile tamil.mapfile telugu.mapfile gujarati.mapfile
 
@@ -12,7 +13,7 @@
 .l.c:
 	$(LEX) $(LFLAGS) $*.l
 	mv lex.yy.c $*.tc
-	sed  \
+	$(SED)  \
 	-e "/^# line/d" \
 	-e "s/parse_small_token/parse_$*/g" \
 	-e "s/^void yyunput/static void yyunput/g" \
@@ -57,10 +58,11 @@
 	-e "s/^# define unput(c).*/# define unput(c) (\*--global_ptr=c)/g" \
 	-e "s/^#define unput(c).*/#define unput(c) (\*--global_ptr=c)/g" \
 	-e "/^#line/d" \
-	-e "/^static char \*global_ptr\;/i\
-#define YY_NO_INPUT" -e "/^static char \*global_ptr\;/i\
-#define YY_NO_UNPUT" -e "/^static char \*global_ptr\;/i\
-#define input() (\*global_ptr++)" $*.tc > $*.c
+	-e "/^static char \*global_ptr\;/{" \
+	    -e "p" -e "s/.*/#define YY_NO_INPUT/" \
+	    -e "p" -e "s/.*/#define YY_NO_UNPUT/" \
+	    -e "p" -e "s/.*/#define input\(\) \(*global_ptr++\)/" \
+	-e "}" $*.tc > $*.c
 	rm -f  $*.tc
 
 noinst_LTLIBRARIES = libphonetic_temp.la
OpenPOWER on IntegriCloud