shithub: freetype+ttf2subf

Download patch

ref: ef4a915e286bc7be45e2390e0b21b00ed7f79211
parent: c6bdee5f27c4ba6a49d781e26ae686d3512e8f56
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Tue Sep 30 12:21:07 EDT 2008

* Fix make rules for multi build on Mac OS X

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2008-09-30  suzuki toshiya  <[email protected]>
 
+	* src/base/rules.mk: Add conditional source to BASE_SRC, for
+	`make multi' on Mac OS X. If the macro $(ftmac_c) is defined,
+	$(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In normal build,
+	the lack of ftmac.c in BASE_SRC is not serious because ftbase.c
+	includes ftmac.c.
+	* builds/unix/unix-def.in: Add a macro definition of $(ftmac_c).
+	* builds/unix/configure.raw: Add procedure to set up appropriate
+	value of $(ftmac_c) with the consideration of the availability
+	of Carbon framework.
+
+2008-09-30  suzuki toshiya  <[email protected]>
+
 	* src/base/Jamfile: Add target for multi build by jam on Mac OS X.
 	* src/base/ftobjs.c (FT_New_Face): Fix the condition to include
 	this function for MPW building. It is synchronized the condition
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -263,6 +263,8 @@
 
 # Whether to use Mac OS resource-based fonts.
 
+ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
+
 # don't quote AS_HELP_STRING!
 AC_ARG_WITH([old-mac-fonts],
   AS_HELP_STRING([--with-old-mac-fonts],
@@ -293,6 +295,7 @@
 
       ])],
     [AC_MSG_RESULT([ok])
+     ftmac_c='ftmac.c'
      AC_MSG_CHECKING([OS_INLINE macro is ANSI compatible])
      orig_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
@@ -626,6 +629,7 @@
 esac
 
 
+AC_SUBST([ftmac_c])
 AC_SUBST([LIBZ])
 AC_SUBST([CFLAGS])
 AC_SUBST([LDFLAGS])
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -65,6 +65,10 @@
 #
 LIB_DIR := $(OBJ_DIR)
 
+# The BASE_SRC macro lists all source files that should be included in
+# src/base/ftbase.c. When configure sets up CFLAGS to build ftmac.c,
+# ftmac.c should be added to BASE_SRC.
+ftmac_c := @ftmac_c@
 
 # The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
 # with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
--- a/src/base/rules.mk
+++ b/src/base/rules.mk
@@ -47,6 +47,10 @@
             $(BASE_DIR)/ftutil.c   \
             $(BASE_DIR)/ftadvanc.c
 
+ifneq ($(ftmac_c),)
+  BASE_SRC += $(BASE_DIR)/$(ftmac_c)
+endif
+
 # Base layer `extensions' sources
 #
 # An extension is added to the library file as a separate object.  It is