* Fix make rules for multi build on Mac OS X
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
diff --git a/ChangeLog b/ChangeLog
index 09486ad..a8d0f40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ * 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 <mpsuzuki@hiroshima-u.ac.jp>
+
* 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
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 5f48d82..d5b053a 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -263,6 +263,8 @@ esac
# 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 @@ if test x$with_old_mac_fonts = xyes; then
])],
[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 @@ case "$CFLAGS" in
esac
+AC_SUBST([ftmac_c])
AC_SUBST([LIBZ])
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index b90ed0c..3a499e7 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -65,6 +65,10 @@ version_info := @version_info@
#
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
diff --git a/src/base/rules.mk b/src/base/rules.mk
index 4a152ab..5a89b45 100644
--- a/src/base/rules.mk
+++ b/src/base/rules.mk
@@ -47,6 +47,10 @@ BASE_SRC := $(BASE_DIR)/ftcalc.c \
$(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