open-src/font/Makefile.bdf
changeset 837 ee480af8e87c
child 907 3c35d611cdaa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/font/Makefile.bdf	Mon Nov 23 11:58:12 2009 -0800
@@ -0,0 +1,164 @@
+# -*- Makefile -*- rules common to most X.Org bdf/pcf font modules
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# 
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# ident	"@(#)Makefile.bdf	1.1	09/11/23 SMI"
+#
+
+### Makefile settings/rules common to most bdf/pcf X.Org font modules
+
+PWD:sh=pwd
+TOP=$(PWD)/../..
+
+MODTYPE=font
+
+### Include common definitions
+include $(TOP)/common/Makefile.init
+
+
+# All the encodings defined in font-util/fontutil.m4.in
+ALL_ENCODINGS = \
+	iso8859-1  iso8859-2  iso8859-3  iso8859-4  iso8859-5  \
+	iso8859-6  iso8859-7  iso8859-8  iso8859-9  iso8859-10 \
+	iso8859-11 iso8859-12 iso8859-13 iso8859-14 iso8859-15 \
+	iso8859-16 jisx0201   koi8-r
+
+# Encodings we split out into separate subdirs for packaging
+BDF_SUBDIR_ENCODINGS =	\
+	iso8859-1       \
+	iso8859-2       \
+        iso8859-3       \
+        iso8859-4       \
+        iso8859-5       \
+        iso8859-7       \
+        iso8859-8       \
+        iso8859-9       \
+        iso8859-10      \
+        iso8859-11      \
+        iso8859-13      \
+        iso8859-14      \
+        iso8859-15      \
+        iso8859-16
+
+BUILD_TYPES = core $(BDF_SUBDIR_ENCODINGS)
+BUILD_TYPES_SET = yes
+
+DISABLE_ALL_ENCODINGS = $(ALL_ENCODINGS:%=--disable-%)
+core_ENCODING_CONFIG_OPTS = $(BDF_SUBDIR_ENCODINGS:%=--disable-%)
+
+iso8859-1_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-1=--enable-iso8859-1)
+iso8859-2_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-2=--enable-iso8859-2)
+iso8859-3_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-3=--enable-iso8859-3)
+iso8859-4_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-4=--enable-iso8859-4)
+iso8859-5_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-5=--enable-iso8859-5)
+iso8859-7_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-7=--enable-iso8859-7)
+iso8859-8_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-8=--enable-iso8859-8)
+iso8859-9_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-9=--enable-iso8859-9)
+iso8859-10_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-10=--enable-iso8859-10)
+iso8859-11_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-11=--enable-iso8859-11)
+iso8859-13_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-13=--enable-iso8859-13)
+iso8859-14_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-14=--enable-iso8859-14)
+iso8859-15_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-15=--enable-iso8859-15)
+iso8859-16_ENCODING_CONFIG_OPTS = \
+	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-16=--enable-iso8859-16)
+
+ENCODED_FONTDIR=$(X11_FONT_DIR)/$(FONTSUBDIR)-$(BUILD_TYPE:iso%=ISO%)
+MODULE_FONTDIR=$(ENCODED_FONTDIR:%-core=%)
+
+MODULE_CONFIG_OPTS = $($(BUILD_TYPE)_ENCODING_CONFIG_OPTS) \
+	--with-fontdir="$(MODULE_FONTDIR)"
+
+BUILD_DIR = build_$(BUILD_TYPE)
+
+core_INSTALL_CORE_FONTS=yes
+# All other build types are left unset for "no"
+MODTYPE_MAKEFLAGS_DEFAULT=$($(BUILD_TYPE)_INSTALL_CORE_FONTS:yes=$(POUND_SIGN))
+$(MODTYPE_MAKEFLAGS_DEFAULT)	MODTYPE_MAKEFLAGS=PCF_FILES=""
+
+MODULE_ADD_INSTALL_TARGETS = install_license
+
+### Include common rulesets
+include ../Makefile.inc
+
+CLEAN_RULES = $(BUILD_TYPES:%=clean_%)
+
+$(CLEAN_RULES):
+	-rm -rf $(@:clean_%=build_%)
+
+# Clean up old directories when we switch to the new rules
+clean:: clean_32
+
+.PARALLEL: $(CLEAN_RULES) clean_32
+
+SOURCE_RULES = $(BUILD_TYPES:%=source_%)
+
+source_%: build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE)
+
+build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE):
+	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE)=%)" $(SOURCE_TARGETS)
+
+.PARALLEL: $(SOURCE_RULES)
+
+CONFIGURE_RULES = $(BUILD_TYPES:%=configure_%)
+
+configure_%: source_%
+	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:configure_%=%)" $(CONFIGURE_TARGETS)
+
+.PARALLEL: $(CONFIGURE_RULES)
+
+BUILD_RULES = $(BUILD_TYPES:%=build_%)
+
+build_%: configure_% 
+	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:build_%=%)" $(BUILD_TARGETS)
+
+.PARALLEL: $(BUILD_RULES)
+
+INSTALL_RULES = $(BUILD_TYPES:%=install_%)
+
+install_%: build_%
+	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:install_%=%)" $(INSTALL_TARGETS)
+
+.PARALLEL: $(INSTALL_RULES) install_license
+
+configure_$(BUILD_TYPE): $(UNPACK_TARGET)
+build_$(BUILD_TYPE): configure_$(BUILD_TYPE)
+install_$(BUILD_TYPE): build_$(BUILD_TYPE)