[FriBidi-commit] fribidi/gen.tab Makefile.am, 1.4,
1.5 gen-bidi-type-tab.c, 1.5, 1.6 gen-mirroring-tab.c, 1.4,
1.5 gen-unicode-version.c, 1.2, 1.3
Behdad Esfahbod
behdad at pdx.freedesktop.org
Sat May 22 04:21:42 PDT 2004
Update of /cvs/fribidi/fribidi/gen.tab
In directory pdx:/tmp/cvs-serv30407/gen.tab
Modified Files:
Makefile.am gen-bidi-type-tab.c gen-mirroring-tab.c
gen-unicode-version.c
Log Message:
Make gen-mirroring-tab and gen-unicode-version work. gen.tab/ works now.
Index: Makefile.am
===================================================================
RCS file: /cvs/fribidi/fribidi/gen.tab/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/Makefile.am 22 May 2004 10:35:30 -0000 1.4
+++ b/Makefile.am 22 May 2004 11:21:40 -0000 1.5
@@ -8,6 +8,7 @@
gen_unicode_version_SOURCES = gen-unicode-version.c
CLEANFILES = $(EXTRA_PROGRAMS)
+DISTCLEANFILES =
AM_CPPFLAGS = \
-I$(top_builddir)/lib \
@@ -15,6 +16,8 @@
-I$(top_srcdir)/charset \
$(MISC_CFLAGS)
+LDADD = $(MISC_LIBS)
+
VPATH += \
$(builddir)/unidata \
$(builddir)/unidata/extracted \
@@ -26,36 +29,80 @@
COMPRESSION = 4
-GEN_BIDI_TYPE_TAB = \
- $(MAKE) $(AM_MAKEFLAGS) gen-bidi-type-tab && \
- (DATA_FILE_TYPE=`echo $< | sed s,.*/,,`; \
- ./gen-bidi-type-tab $(COMPRESSION) \
- $$DATA_FILE_TYPE $< > $@ || ($(RM) $@ && false))
+BIDI_TYPE_TAB_VARIANTS = \
+ UnicodeData_bidi-type.tab.i \
+ DerivedBidiClass_bidi-type.tab.i
-bidi-type_UnicodeData.tab.i: \
+UnicodeData_bidi-type.tab.i: \
UnicodeData.txt \
fribidi-unicode-version.h \
- $(gen_bidi_type_tab_sources)
+ $(gen_bidi_type_tab_SOURCES)
-bidi-type_DerivedBidiClass.tab.i: \
+DerivedBidiClass_bidi-type.tab.i: \
DerivedBidiClass.txt \
fribidi-unicode-version.h \
- $(gen_bidi_type_tab_sources)
+ $(gen_bidi_type_tab_SOURCES)
-bidi-type_UnicodeData.tab.i bidi-type_DerivedBidiClass.tab.i:
- $(GEN_BIDI_TYPE_TAB)
+$(BIDI_TYPE_TAB_VARIANTS):
+ $(MAKE) $(AM_MAKEFLAGS) gen-bidi-type-tab
+ (DATA_FILE_TYPE=`echo $< | sed s,.*/,,`; \
+ ./gen-bidi-type-tab $(COMPRESSION) \
+ $$DATA_FILE_TYPE $< > $@ || ($(RM) $@ && false))
bidi-type.tab.i:
- @ \
- ($(MAKE) $(AM_MAKEFLAGS) bidi-type_DerivedBidiClass.tab.i \
- && mv bidi-type_DerivedBidiClass.tab.i $@) \
- || \
- ($(MAKE) $(AM_MAKEFLAGS) bidi-type_UnicodeData.tab.i \
- && mv bidi-type_UnicodeData.tab.i $@) \
- || \
- (echo Cannot build $@. \
- && false)
+ @for x in $(BIDI_TYPE_TAB_VARIANTS); do \
+ if $(MAKE) $(AM_MAKEFLAGS) $$x && mv $$x $@; then \
+ break; \
+ fi; \
+ done; \
+ test -f $@ || (echo Could not build $@; false)
+
+DISTCLEANFILES += $(BIDI_TYPE_TAB_VARIANTS)
+
+# mirroring.tab.i
+
+MIRRORING_TAB_VARIANTS = \
+ BidiMirroring_mirroring.tab.i
+
+BidiMirroring_mirroring.tab.i: \
+ BidiMirroring.txt \
+ fribidi-unicode-version.h \
+ $(gen_mirroring_tab_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) gen-mirroring-tab
+ (DATA_FILE_TYPE=`echo $< | sed s,.*/,,`; \
+ ./gen-mirroring-tab \
+ $$DATA_FILE_TYPE $< > $@ || ($(RM) $@ && false))
+
+mirroring.tab.i:
+ @for x in $(MIRRORING_TAB_VARIANTS); do \
+ if $(MAKE) $(AM_MAKEFLAGS) $$x && mv $$x $@; then \
+ break; \
+ fi; \
+ done; \
+ test -f $@ || (echo Could not build $@; false)
+
+DISTCLEANFILES += $(MIRRORING_TAB_VARIANTS)
+
+# fribidi-unicode-version.h
+
+UNICODE_VERSION_VARIANTS = \
+ ReadMe_fribidi-unicode-version.h
+
+ReadMe_fribidi-unicode-version.h: \
+ ReadMe.txt \
+ $(gen_unicode_version_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) gen-unicode-version
+ (DATA_FILE_TYPE=`echo $< | sed s,.*/,,`; \
+ ./gen-unicode-version \
+ $$DATA_FILE_TYPE $< > $@ || ($(RM) $@ && false))
+
+fribidi-unicode-version.h:
+ @for x in $(UNICODE_VERSION_VARIANTS); do \
+ if $(MAKE) $(AM_MAKEFLAGS) $$x && mv $$x $@; then \
+ break; \
+ fi; \
+ done; \
+ test -f $@ || (echo Could not build $@; false)
+
+DISTCLEANFILES += $(UNICODE_VERSION_VARIANTS)
-BUILT_TEMP_FILES = \
- bidi-type_DerivedBidiClass.tab.i \
- bidi-type_UnicodeData.tab.i
Index: gen-bidi-type-tab.c
===================================================================
RCS file: /cvs/fribidi/fribidi/gen.tab/gen-bidi-type-tab.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/gen-bidi-type-tab.c 22 May 2004 10:35:30 -0000 1.5
+++ b/gen-bidi-type-tab.c 22 May 2004 11:21:40 -0000 1.6
@@ -196,7 +196,7 @@
for (i = type_names_count - 1; i >= 0; i--)
names[type_names[i].key] = type_names[i].name;
- init_tab();
+ init_tab ();
}
static void
Index: gen-mirroring-tab.c
===================================================================
RCS file: /cvs/fribidi/fribidi/gen.tab/gen-mirroring-tab.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/gen-mirroring-tab.c 22 May 2004 10:35:30 -0000 1.4
+++ b/gen-mirroring-tab.c 22 May 2004 11:21:40 -0000 1.5
@@ -82,8 +82,8 @@
die4 (
char *fmt,
unsigned long l,
- char *p,
- char *q
+ unsigned long p,
+ unsigned long q
)
{
fprintf (stderr, appname ": ");
Index: gen-unicode-version.c
===================================================================
RCS file: /cvs/fribidi/fribidi/gen.tab/gen-unicode-version.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/gen-unicode-version.c 22 May 2004 10:35:30 -0000 1.2
+++ b/gen-unicode-version.c 22 May 2004 11:21:40 -0000 1.3
@@ -79,14 +79,14 @@
}
int version_major, version_minor, version_micro;
-char *unicode_version;
+char unicode_version[100];
static void
init_tab (
)
{
version_major = version_minor = version_micro = 0;
- unicode_version = "unknown";
+ strcpy (unicode_version, "(unknown)");
}
static void
@@ -102,7 +102,6 @@
{
sscanf (p, "Version %d.%d.%d", &version_major, &version_minor,
&version_micro);
- unicode_version = fribidi_malloc (100);
sprintf (unicode_version, "%d.%d.%d", version_major, version_minor,
version_micro);
return;
More information about the FriBidi-Commit
mailing list