From 211d0f322cdb279a69c04f8212f9b1e541ecb369 Mon Sep 17 00:00:00 2001 From: behdad Date: Tue, 27 Apr 2004 16:47:22 +0000 Subject: [PATCH] First try to integrate c2man manual generation in build system. --- charset/Headers.mk | 21 ++++++----- charset/fribidi-char-sets-list.h | 10 ++++-- doc/Makefile.am | 62 ++++++++++++++++++++++---------- lib/Headers.mk | 16 ++++++++- lib/bidi-types-list.h | 10 +++--- lib/common.h | 10 +++--- lib/debug.h | 8 ++--- lib/fribidi-begindecls.h | 2 ++ lib/fribidi-enddecls.h | 2 ++ lib/fribidi-types.h | 14 ++++---- lib/mem.h | 8 ++--- 11 files changed, 107 insertions(+), 56 deletions(-) diff --git a/charset/Headers.mk b/charset/Headers.mk index 2f6fb29..751a81c 100644 --- a/charset/Headers.mk +++ b/charset/Headers.mk @@ -1,9 +1,14 @@ libfribidi_char_sets_la_headers = \ - fribidi-char-sets-cap-rtl.h \ - fribidi-char-sets-cp1255.h \ - fribidi-char-sets-cp1256.h \ - fribidi-char-sets.h \ - fribidi-char-sets-iso8859-6.h \ - fribidi-char-sets-iso8859-8.h \ - fribidi-char-sets-list.h \ - fribidi-char-sets-utf8.h + fribidi-char-sets-cap-rtl.h \ + fribidi-char-sets-cp1255.h \ + fribidi-char-sets-cp1256.h \ + fribidi-char-sets.h \ + fribidi-char-sets-iso8859-6.h \ + fribidi-char-sets-iso8859-8.h \ + fribidi-char-sets-list.h \ + fribidi-char-sets-utf8.h + +libfribidi_char_sets_la_symbols = \ + fribidi_charset_to_unicode \ + fribidi_unicode_to_charset \ + fribidi_parse_charset diff --git a/charset/fribidi-char-sets-list.h b/charset/fribidi-char-sets-list.h index c5df751..a7b0269 100644 --- a/charset/fribidi-char-sets-list.h +++ b/charset/fribidi-char-sets-list.h @@ -2,10 +2,10 @@ /* FriBidi * fribidi-char-sets-list.h - list of supported character sets * - * $Id: fribidi-char-sets-list.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: fribidi-char-sets-list.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/charset/fribidi-char-sets-list.h,v $ * * Author: @@ -40,12 +40,16 @@ # define _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET # define _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET #endif /* _FRIBIDI_ADD_CHAR_SET */ +#ifdef _FRIBIDI_ADD_CHAR_SET_OTHERS _FRIBIDI_ADD_CHAR_SET_OTHERS (UTF8, utf8) /* UTF-8 (Unicode) */ _FRIBIDI_ADD_CHAR_SET_OTHERS (CAP_RTL, cap_rtl) /* CapRTL (Test) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_OTHERS */ +#ifdef _FRIBIDI_ADD_CHAR_SET_ONE2ONE _FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_6, iso8859_6) /* ISO8859-6 (Arabic) */ _FRIBIDI_ADD_CHAR_SET_ONE2ONE (ISO8859_8, iso8859_8) /* ISO8859-8 (Hebrew) */ _FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1255, cp1255) /* CP1255 (MS Hebrew/Yiddish) */ _FRIBIDI_ADD_CHAR_SET_ONE2ONE (CP1256, cp1256) /* CP1256 (MS Arabic) */ +#endif /* _FRIBIDI_ADD_CHAR_SET_ONE2ONE */ #ifdef _FRIBIDI_ADD_CHAR_SET # undef _FRIBIDI_ADD_CHAR_SET_OTHERS # undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE diff --git a/doc/Makefile.am b/doc/Makefile.am index c1db3d6..41b46d2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,27 +1,51 @@ -libfribidi_mans = \ - fribidi_get_bidi_type.3 - fribidi_get_bidi_types.3 - fribidi_log2vis.3 - fribidi_log2vis_get_embedding_levels.3 - fribidi_remove_bidi_marks.3 - fribidi_get_mirror_char.3 - fribidi_debug_status.3 - fribidi_set_debug.3 - fribidi_mirroring_status.3 - fribidi_set_mirroring.3 - fribidi_reorder_nsm_status.3 - fribidi_set_reorder_nsm.3 +# man3 +includepath = -I$(top_builddir) +includevpath = $(top_builddir) +headers = +inst_symbols = +noinst_symbols = + +include $(top_srcdir)/lib/Headers.mk +headers += $(libfribidi_la_headers) +includepath += -I$(top_srcdir)/lib -I$(top_builddir)/lib +includevpath += :$(top_srcdir)/lib:$(top_builddir)/lib +inst_symbols += $(libfribidi_la_symbols) +include $(top_srcdir)/charset/Headers.mk +headers += $(libfribidi_char_sets_la_headers) +includepath += -I$(top_srcdir)/charset +includevpath += :$(top_srcdir)/charset if FRIBIDI_CHARSETS +inst_symbols += $(libfribidi_char_sets_la_symbols) +else # !FRIBIDI_CHARSETS +noinst_symbols += $(libfribidi_char_sets_la_symbols) +endif # !FRIBIDI_CHARSETS +# name of the header to include in the manual +headers += fribidi.h -endif +dist_man_MANS = $(inst_symbols:=.3) +dist_noinst_MANS = $(noinst_symbols:=.3) -headers = -include $(top_srcdir)/charset/Headers.mk -headers += $(libfribidi_char_sets_la_headers) -include $(top_srcdir)/lib/Headers.mk -headers += $(libfribidi_la_headers) +man3 = $(dist_man_MANS) $(dist_noinst_MANS) + +MAINTAINERCLEANFILES = $(man3) + +C2MANFLAGS = $(includepath) -DDONT_HAVE_FRIBIDI_CONFIG_H -M "$(PACKAGE_NAME)" +VPATH += $(includevpath) + +c2man.stamp: $(headers) + @$(RM) $@.tmp + @touch $@.tmp + $(top_srcdir)/missing --run c2man -T n $(C2MANFLAGS) $^ + @mv $@.tmp $@ +$(man3): c2man.stamp + @if test -f $@; then \ + touch $@; \ + else \ + $(RM) $<; \ + $(MAKE) $(AM_MAKEFLAGS) $<; \ + fi diff --git a/lib/Headers.mk b/lib/Headers.mk index 9ea5381..226d726 100644 --- a/lib/Headers.mk +++ b/lib/Headers.mk @@ -11,4 +11,18 @@ libfribidi_la_headers = \ fribidi-types.h \ fribidi-unicode.h \ fribidi-unicode-version.h \ - fribidi.h # should be the last entry + fribidi.h + +libfribidi_la_symbols = \ + fribidi_get_bidi_type \ + fribidi_get_bidi_types \ + fribidi_log2vis \ + fribidi_log2vis_get_embedding_levels \ + fribidi_remove_bidi_marks \ + fribidi_get_mirror_char \ + fribidi_debug_status \ + fribidi_set_debug \ + fribidi_mirroring_status \ + fribidi_set_mirroring \ + fribidi_reorder_nsm_status \ + fribidi_set_reorder_nsm diff --git a/lib/bidi-types-list.h b/lib/bidi-types-list.h index 7c08d27..fa39118 100644 --- a/lib/bidi-types-list.h +++ b/lib/bidi-types-list.h @@ -1,11 +1,11 @@ -#if !__C2MAN__ +#ifndef __C2MAN__ /* FriBidi * bidi-types-list.h - list of bidi types * - * $Id: bidi-types-list.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: bidi-types-list.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/Attic/bidi-types-list.h,v $ * * Author: @@ -64,6 +64,6 @@ _FRIBIDI_ADD_TYPE (WR, 'r') /* Weak Right to left */ _FRIBIDI_ADD_TYPE (SOT, '^') /* Start Of Text */ _FRIBIDI_ADD_TYPE (EOT, '$') /* End Of Text */ -#if !__C2MAN__ +#ifndef __C2MAN__ /* *INDENT-ON* */ #endif /* !__C2MAN__ */ diff --git a/lib/common.h b/lib/common.h index 737a1ae..8e3e428 100644 --- a/lib/common.h +++ b/lib/common.h @@ -1,10 +1,10 @@ /* FriBidi * common.h - common include for library sources * - * $Id: common.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: common.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/common.h,v $ * * Author: @@ -61,7 +61,7 @@ # ifndef SIZEOF_VOID_P # define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P # endif /* !SIZEOF_VOID_P */ -# if !__C2MAN__ +# ifndef __C2MAN__ # include # endif /* !__C2MAN__ */ # ifndef fribidi_malloc @@ -74,7 +74,7 @@ * No need to include any headers. */ #ifndef fribidi_malloc # if HAVE_STDLIB_H -# if !__C2MAN__ +# ifndef __C2MAN__ # include # endif /* __C2MAN__ */ # define fribidi_malloc malloc diff --git a/lib/debug.h b/lib/debug.h index 1ff6d87..d17921c 100644 --- a/lib/debug.h +++ b/lib/debug.h @@ -1,10 +1,10 @@ /* FriBidi * debug.h - debug-only interfaces * - * $Id: debug.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: debug.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/debug.h,v $ * * Author: @@ -44,7 +44,7 @@ #if DEBUG #ifndef FRIBIDI_FPRINTF -# if !__C2MAN__ +# ifndef __C2MAN__ # include # endif /* !__C2MAN__ */ # define FRIBIDI_FPRINTF fprintf diff --git a/lib/fribidi-begindecls.h b/lib/fribidi-begindecls.h index 00f0ec9..0f4acdd 100644 --- a/lib/fribidi-begindecls.h +++ b/lib/fribidi-begindecls.h @@ -1 +1,3 @@ +#ifdef FRIBIDI_BEGIN_DECLS FRIBIDI_BEGIN_DECLS +#endif /* FRIBIDI_BEGIN_DECLS */ diff --git a/lib/fribidi-enddecls.h b/lib/fribidi-enddecls.h index 7c35e15..eb300c9 100644 --- a/lib/fribidi-enddecls.h +++ b/lib/fribidi-enddecls.h @@ -1 +1,3 @@ +#ifdef FRIBIDI_END_DECLS FRIBIDI_END_DECLS +#endif /* FRIBIDI_END_DECLS */ diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h index aad8320..e938a13 100644 --- a/lib/fribidi-types.h +++ b/lib/fribidi-types.h @@ -1,10 +1,10 @@ /* FriBidi * fribidi-types.h - define data types for the rest of the library * - * $Id: fribidi-types.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: fribidi-types.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/fribidi-types.h,v $ * * Author: @@ -40,7 +40,7 @@ #if !FRIBIDI_USE_GLIB # if HAVE_INTTYPES_H -# if !__C2MAN__ +# ifndef __C2MAN__ # include # endif /* !__C2MAN__ */ # define FRIBIDI_UINT8_LOCAL uint8_t @@ -48,7 +48,7 @@ # define FRIBIDI_UINT32_LOCAL uint32_t # else /* !HAVE_INTTYPES_H */ # if HAVE_STDINT_H -# if !__C2MAN__ +# ifndef __C2MAN__ # include # endif /* !__C2MAN__ */ # define FRIBIDI_UINT8_LOCAL uint8_t @@ -74,7 +74,7 @@ # define FRIBIDI_BOOLEAN_LOCAL int # endif /* !HAVE_STDBOOL_H */ # if SIZEOF_WCHAR_T >= 4 -# if !__C2MAN__ +# ifndef __C2MAN__ # if STDC_HEADERS # include # include @@ -89,7 +89,7 @@ # define FRIBIDI_UNICHAR_LOCAL fribidi_uint32 # endif /* SIZEOF_WCHAR_T < 4 */ #else /* FRIBIDI_USE_GLIB */ -# if !__C2MAN__ +# ifndef __C2MAN__ # include # include # endif /* !__C2MAN__ */ diff --git a/lib/mem.h b/lib/mem.h index 80a5a2d..cdaf510 100644 --- a/lib/mem.h +++ b/lib/mem.h @@ -1,10 +1,10 @@ /* FriBidi * mem.h - memory manipulation routines * - * $Id: mem.h,v 1.1 2004-04-25 18:47:57 behdad Exp $ + * $Id: mem.h,v 1.2 2004-04-27 16:47:22 behdad Exp $ * $Author: behdad $ - * $Date: 2004-04-25 18:47:57 $ - * $Revision: 1.1 $ + * $Date: 2004-04-27 16:47:22 $ + * $Revision: 1.2 $ * $Source: /home/behdad/src/fdo/fribidi/togit/git/../fribidi/fribidi2/lib/mem.h,v $ * * Author: @@ -62,7 +62,7 @@ void *fribidi_mem_chunk_alloc ( #else /* FRIBIDI_USE_GLIB */ -#if !__C2MAN__ +#ifndef __C2MAN__ # include #endif /* !__C2MAN__ */ -- 2.40.0