open-src/font/Makefile.bdf
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 22 Jul 2011 16:05:14 -0700
changeset 1171 d941ec5f3d1f
parent 1043 16f3a9b8588b
permissions -rw-r--r--
7069938 Stop delivering 75dpi & 100dpi iso8859-16 font dirs sans fonts

# -*- Makefile -*- rules common to most X.Org bdf/pcf font modules
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
#
# 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, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# 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.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
#

### Makefile settings/rules common to most bdf/pcf X.Org font modules

PWD:sh=pwd
TOP=$(PWD)/../../..

MODTYPE=font

### Include common definitions
include $(TOP)/open-src/common/Makefile.init

# Default package name for bitmap font packages
MODTYPE_PKGHIER 		= system/font/xorg
MODTYPE_PKGHIER_SET 		= yes
MODULE_PKGTAIL_DEFAULT          = $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN))
$(MODULE_PKGTAIL_DEFAULT)	MODULE_PKGTAIL = $(BUILD_TYPE:core=xorg-core)
$(MODULE_PKGTAIL_DEFAULT)	MODULE_PKGTAIL_SET = yes

# 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
ALL_BDF_SUBDIR_ENCODINGS = \
	iso8859-1       \
	iso8859-2       \
        iso8859-3       \
        iso8859-4       \
        iso8859-9       \
        iso8859-10      \
        iso8859-13      \
        iso8859-14      \
        iso8859-15

misc_BDF_SUBDIR_ENCODINGS = \
	$(ALL_BDF_SUBDIR_ENCODINGS) \
        iso8859-5       \
        iso8859-7       \
        iso8859-8	\
        iso8859-11      \
        iso8859-16
100dpi_BDF_SUBDIR_ENCODINGS = $(ALL_BDF_SUBDIR_ENCODINGS)
75dpi_BDF_SUBDIR_ENCODINGS = $(ALL_BDF_SUBDIR_ENCODINGS)
BDF_SUBDIR_ENCODINGS = $($(FONTSUBDIR)_BDF_SUBDIR_ENCODINGS)

BUILD_TYPES = core $(BDF_SUBDIR_ENCODINGS)
BUILD_TYPES_SET = yes

core_ENCODING_CONFIG_OPTS = $(BDF_SUBDIR_ENCODINGS:%=--disable-%)

 iso8859-1_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-1
 iso8859-2_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-2
 iso8859-3_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-3
 iso8859-4_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-4
 iso8859-5_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-5
 iso8859-7_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-7
 iso8859-8_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-8
 iso8859-9_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-9
iso8859-10_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-10
iso8859-11_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-11
iso8859-13_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-13
iso8859-14_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-14
iso8859-15_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-15
iso8859-16_ENCODING_CONFIG_OPTS = --disable-all-encodings --enable-iso8859-16


ENCODED_FONTSUBDIR = $(FONTSUBDIR)-$(BUILD_TYPE:iso%=ISO%)
BDF_SUBDIR = $(ENCODED_FONTSUBDIR:%-core=%)
MODULE_FONTDIR = $(X11_FONT_DIR)/$(BDF_SUBDIR)

MODULE_CONFIG_OPTS = $($(BUILD_TYPE)_ENCODING_CONFIG_OPTS) \
	--with-fontdir="$(MODULE_FONTDIR)"

# Font path entries
iso8859-1_PRIORITY 	= 0
iso8859-2_PRIORITY 	= 1
iso8859-3_PRIORITY 	= 1
iso8859-4_PRIORITY 	= 1
iso8859-5_PRIORITY 	= 1
iso8859-6_PRIORITY 	= 1
iso8859-7_PRIORITY 	= 1
iso8859-8_PRIORITY 	= 1
iso8859-9_PRIORITY 	= 1
iso8859-10_PRIORITY 	= 1
iso8859-11_PRIORITY 	= 1
iso8859-12_PRIORITY 	= 1
iso8859-13_PRIORITY 	= 1
iso8859-14_PRIORITY 	= 1
iso8859-15_PRIORITY 	= 1
iso8859-16_PRIORITY 	= 1
core_PRIORITY		= 2

misc_PRIORITY		= 15
100dpi_PRIORITY		= 20
75dpi_PRIORITY		= 25

unscaled_PRIORITY = 0 + $($(BUILD_TYPE)_PRIORITY) + $($(FONTSUBDIR)_PRIORITY)
scaled_PRIORITY	  = 70 + $(unscaled_PRIORITY)

# Use of $(( )) causes ksh93 to evaluate the arithmetic expression
FONTPATH_LINKS = $(BDF_SUBDIR):unscaled:pri=$$(( $(unscaled_PRIORITY) ))
FONTPATH_LINKS += $(BDF_SUBDIR):pri=$$(( $(scaled_PRIORITY) ))

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

# Special rules for pkg manifest generation
MANIFEST_TARGETS=$(BUILD_TYPES:%=manifest_%)
MANIFEST_TARGETS_SET=yes

### Include common rulesets
include ../Makefile.inc

# Clean up old directories when we switch to the new rules
clean: clean_32

clean_32:
	-rm -rf build_32

configure_$(BUILD_TYPE): $(UNPACK_TARGET)
build_$(BUILD_TYPE): configure_$(BUILD_TYPE)
install_$(BUILD_TYPE): build_$(BUILD_TYPE)

manifest_%: 
	/usr/xpg4/bin/make $(MAKEFLAGS) manifest-per-type \
		BUILD_TYPES="$(@:manifest_%=%)" \
		MODULE_PKGTAIL="$(@:manifest_%=%)" MODULE_PKGTAIL_SET="yes"