Makefile
author jenda
Mon, 13 Dec 2010 18:09:48 +0100
changeset 123 a99c85250563
parent 122 8ff29aae866c
child 125 0e6428cfa223
permissions -rw-r--r--
improve manifests for IPS migration: one-locale packages dependencies
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     1
#
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     2
# CDDL HEADER START
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     3
#
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
111
33aaab5040ad 6900712 [PSARC/2009/528] Remove obsolete short-form locales
hnhn
parents: 109
diff changeset
     5
# Common Development and Distribution License (the "License").
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     7
#
29
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     8
# You can obtain a copy of the license at OPENSOLARIS.LICENSE
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    10
# See the License for the specific language governing permissions
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    11
# and limitations under the License.
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    12
#
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
29
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    14
# file and include the License file at OPENSOLARIS.LICENSE.
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    18
#
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    19
# CDDL HEADER END
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    20
#
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    21
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
29
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    22
#
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
    23
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    24
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    25
# common applications
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    26
JAVA		?= java
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    27
ANT		?= ant
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    28
LOCALEDEF	?= localedef
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    29
WGET		?= wget
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    30
GNU_PATCH	?= gpatch
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    31
UNZIP		?= unzip
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    32
ZIP		?= zip
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    33
PERL		?= perl
88
a661c82f242f 6892885 sync SUNWlocaledefsrc with latest locale sources
jenda
parents: 73
diff changeset
    34
BZIP2		?= bzip2
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    35
CC		= /opt/SUNWspro/bin/cc
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    36
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    37
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    38
# internal applications
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    39
GEN_CHARMAP	= $(JAVA) $(CLDR_JAVAFLAGS) -cp $(call classpath) org.unicode.cldr.posix.GenerateCharmap 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    40
GEN_POSIX	= $(JAVA) $(CLDR_JAVAFLAGS) -cp $(call classpath) org.unicode.cldr.posix.GeneratePOSIX 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    41
GEN_DESCRIPTION	= $(JAVA) $(CLDR_JAVAFLAGS) -cp $(call classpath) org.unicode.cldr.tool.LocaleDescription
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    42
XMLVALIDATOR	= $(JAVA) $(CLDR_JAVAFLAGS) -cp $(call classpath) org.unicode.cldr.util.XMLValidator
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    43
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    44
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    45
# software versions
70
0cd17230b8c4 switch CLDR default version from 1.6.1 to 1.7.1
jenda
parents: 66
diff changeset
    46
CLDR_VERSION		:= 1.7.1
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    47
ICU4J_VERSION		:= 4.2
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    48
XALAN_VERSION		:= 2.7.1
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    49
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    50
CLDR_CORE_SOURCE	:= core_$(subst .,_,$(CLDR_VERSION)).zip
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    51
CLDR_CORE_SITE		:= http://unicode.org/Public/cldr/$(CLDR_VERSION)/core.zip
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    52
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    53
CLDR_TOOLS_SOURCE	:= tools_$(subst .,_,$(CLDR_VERSION)).zip
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    54
CLDR_TOOLS_SITE		:= http://unicode.org/Public/cldr/$(CLDR_VERSION)/tools.zip
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    55
66
d1c62e94cfd4 build icu4j from source because the public zip does not contain utilities.jar
jenda
parents: 61
diff changeset
    56
ICU4J_SOURCE		:= icu4j-$(subst .,_,$(ICU4J_VERSION))-src.jar
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    57
ICU4J_SITE		:= http://download.icu-project.org/files/icu4j/$(ICU4J_VERSION)/$(ICU4J_SOURCE)
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    59
XALAN_SOURCE		:= xalan-j_$(subst .,_,$(XALAN_VERSION))-bin.zip
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    60
XALAN_SITE		:= http://www.mirrorgeek.com/apache.org/xml/xalan-j/$(XALAN_SOURCE)
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    61
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    62
CLDR_DTD_SOURCE		:= cldr_dtd.$(subst .,_,$(CLDR_VERSION)).zip
58
629fd75208e1 define downloaded software versions in config.mk
jenda
parents: 57
diff changeset
    63
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    64
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    65
# architecture
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    66
MACH		:= $(shell uname -p)
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    67
MACH64_sparc	= sparcv9
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    68
MACH64_i386	= amd64
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    69
MACH64		= $(MACH64_$(MACH))
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    70
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    71
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    72
# compile flags
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    73
#
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    74
#	CFLAGS_*:	flags for both (32/64bit) targets
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    75
#	CFLAGS32_*:	flags for 32bit target
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    76
#	CFLAGS64_*:	flags for 64bit target
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    77
#	CFLAGS*_common:	flags for both (i386/sparc) architectures
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    78
#	CFLAGS*_sparc:	flags for sparc architecture only
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    79
#	CFLAGS*_i386:	flags for i386 architecture only
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    80
CFLAGS_common	= -xO3 -Xa -xildoff -xc99=%none -v -K pic -D PIC -G -I. -z defs -z text -z ignore -D_REENTRANT
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    81
CFLAGS32_common	= -m32
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    82
CFLAGS64_common	= -m64
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    83
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    84
CFLAGS_sparc	= -xarch=sparc -xspace -W0\,-Lt -W2\,-Rcond_elim -Wd\,-xsafe=unboundsym -xregs=no%appl
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    85
CFLAGS64_sparc	= -dalign -v  -Wc\,-Qiselect-regsym=0
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    86
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    87
CFLAGS32_i386	= -xspace
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    88
CFLAGS64_i386	= -xarch=sse2 -Ui386 -U__i386  
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    89
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    90
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    91
# java flags
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    92
# for cldr posix locale generator
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    93
JAVAFLAGS	= -Xmx256m
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    94
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
    95
# misc
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    96
DOWNLOADS	?= .
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    97
PKG_REPO	?= http://localhost:80
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    98
FILEROOT	= proto/$(MACH)/fileroot
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
    99
UNICODESET	= [[\u0000-\U0010FFFF]-[[:Phoenician:][:Kharoshthi:][:Cuneiform:][\U0001D200-\U0001D24F][:Lycian:][:Carian:][:Lydian:][\U0001F000-\U0001F02F][\U0001F030-\U0001F09F]]]
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   100
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   101
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   102
# ==== END OF CONFIGURATION ====
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   103
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   104
# To put more focus on warnings, be less verbose as default
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   105
# Use 'make V=1' to see the full commands
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   106
ifeq ($(V),1)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   107
  M=@\#
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   108
  Q=
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   109
else
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   110
  M=@echo ' '  
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   111
  Q=@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   112
endif
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   113
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   114
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   115
# list of all locales
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   116
LOCALES = $(basename $(notdir $(wildcard locale/*.spec)))
30
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
   117
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   118
# C flags
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   119
CFLAGS32	?= $(CFLAGS_common) $(CFLAGS32_common) $(CFLAGS_$(MACH)) $(CFLAGS32_$(MACH))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   120
CFLAGS64	?= $(CFLAGS_common) $(CFLAGS64_common) $(CFLAGS_$(MACH)) $(CFLAGS64_$(MACH))
26
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents: 24
diff changeset
   121
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   122
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   123
# java flags for cldr posix locale generator
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   124
#	'-DCLDR_DTD_CACHE=.dtd_cache':		cache dir for temporary files
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   125
#	'-Dhttp.proxyHost=webcache.sfbay -Dhttp.proxyPort=8080:		default web proxy
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   126
CLDR_JAVAFLAGS	= $(JAVAFLAGS) -Dhttp.proxyHost=webcache.sfbay -Dhttp.proxyPort=8080 -DCLDR_DTD_CACHE=build/.dtd_cache
5
63aec4025526 locale_cldr: move list of generated locales (and variants) from Makefile to locale.list
jenda
parents: 4
diff changeset
   127
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   128
# locale name parsing functions
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   129
locale_xxYY = $(firstword $(subst ., ,$(1)))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   130
charmap = $(firstword $(subst @, ,$(lastword $(subst ., ,$(1)))))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   131
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   132
# misrc
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   133
#   CLDR uses different names for some charmaps 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   134
cldr_charmap = $(subst ANSI1251,ansi-1251,$(call charmap,$(1)))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   135
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   136
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   137
# ************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   138
# ==== Public targets ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   139
# ************************
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
   140
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   141
.PHONY: all install ips pkgsend doc clean
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
   142
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   143
all: build/pkgs.d build/cldr.d locale_objects
8
44f8eb36a5e1 locele_cldr: fix minor makefile bugs
jenda
parents: 6
diff changeset
   144
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   145
install: install_svr4
31
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
   146
60
92964c89eaf2 fix 'ips' make target
jenda
parents: 58
diff changeset
   147
ips: install_ips
92964c89eaf2 fix 'ips' make target
jenda
parents: 58
diff changeset
   148
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   149
pkgsend: pkgsend_ips
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   150
73
db0f94907036 add diff.html report
jenda
parents: 70
diff changeset
   151
doc: build/report_diff.html
61
aa074266466f fix default value of key 'manifest'
jenda
parents: 60
diff changeset
   152
57
706a08680440 reorder and simplify makefiles, build all code in ./build dir
jenda
parents: 39
diff changeset
   153
clean: 
88
a661c82f242f 6892885 sync SUNWlocaledefsrc with latest locale sources
jenda
parents: 73
diff changeset
   154
	rm -Rf build pkgmaps proto
0
ab8dc3de97cd extension of locale data build process - build locale data from CLDR directly
jenda
parents:
diff changeset
   155
38
ea0937345b04 add 'make ips' target
jenda
parents: 36
diff changeset
   156
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   157
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   158
# ****************************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   159
# ==== generate makefile depend files ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   160
# ****************************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   161
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   162
-include build/pkgs.d
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   163
-include build/cldr.d
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   164
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   165
.PHONY: $(PKGS)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   166
115
e6a10d95ac6f remove SUNWlocaledefsrc (obsolete pkg) building rules from Makefile
jenda
parents: 113
diff changeset
   167
# little woo-doo: %pkg is hash of arrays, key is pkg_name, values are locales; 
e6a10d95ac6f remove SUNWlocaledefsrc (obsolete pkg) building rules from Makefile
jenda
parents: 113
diff changeset
   168
# ... look to the generated 'build/pkgs.d'
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   169
build/pkgs.d: $(LOCALES:%=build/%/pkg_name) build/.dir
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   170
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   171
	$(Q)$(PERL) -e 'push @{$$pkg{substr(`cat $$_`,0,-1)}},m!build/(.*)/pkg_name! foreach (glob "build/*/pkg_name"); \
115
e6a10d95ac6f remove SUNWlocaledefsrc (obsolete pkg) building rules from Makefile
jenda
parents: 113
diff changeset
   172
		 print "PKGS ?= " . join(" ", keys %pkg) . "\n"; \
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   173
		 print "build/$$_/.installed: " . join(" ", map { "build/$$_/.installed" } @{$$pkg{$$_}}) ."\n" foreach (keys %pkg); \
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   174
		 print "build/$$_/prototype: " . join(" ", map { "build/$$_/prototype" } @{$$pkg{$$_}}) ."\n" foreach (keys %pkg); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   175
		 print "build/$$_/manifest: " . join(" ", map { "build/$$_/manifest" } @{$$pkg{$$_}}) ."\n" foreach (keys %pkg); ' > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   176
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   177
build/cldr.d: $(LOCALES:%=build/%/cldr_variant) build/.dir
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   178
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   179
	$(Q)$(PERL) -e 'my %loc = map { m!build/(.*)/cldr_variant! => `cat $$_` =~ m!.*copy_ctype=([^,\n]*).*! } qw($^); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   180
		print "build/$$k/posix.src: $$v\n" while(($$k,$$v) = each %loc); %loc = map { $$_ => m!\.([^@]*)! } keys %loc; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   181
		print "build/$$k/32bit.so.3 build/$$k/64bit.so.3: build/$$v.cm misc/$$v.x\n" while(($$k,$$v) = each %loc); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   182
		print "CHARMAPS ?= " . join(" ", grep { ! $$seen1{$$_}++ } values %loc) . "\n";' > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   183
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   184
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   185
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   186
# ************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   187
# ==== Locale Objects ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   188
# ************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   189
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   190
.PHONY: locale_objects
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   191
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   192
locale_objects: $(LOCALES:%=build/%/32bit.so.3) $(LOCALES:%=build/%/64bit.so.3)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   193
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   194
# all jars that CldrTools needs
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   195
CLDR_TOOLS_DEPS	= build/icu4j.jar build/xalan.jar build/xml-apis.jar build/utilities.jar build/cldr.jar build/cldr_core/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   196
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   197
$(LOCALES:%=build/%/posix.src): build/%/posix.src: build/%/cldr_variant $(CLDR_TOOLS_DEPS) build/.dtd_cache/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   198
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   199
	$(Q)$(GEN_POSIX) -s build/cldr_core -d $(@D) -o $(@F) -c $(call cldr_charmap,$*) -m $(shell cat $<) 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   200
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   201
$(LOCALES:%=build/%/32bit.so.3): build/%/32bit.so.3: build/%/posix.src build/%/32bit/.methods_so
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   202
	$(M)LOCALEDEF $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   203
	$(Q)cd $(@D)/32bit; $(LOCALEDEF) $(if $(Q),,-v) -P $(dir $(CC)) -W cc,"$(CFLAGS32)" -L "-R\\\$$ORIGIN" -x ../../../misc/$(call charmap, $*).x -f ../../$(call charmap, $*).cm -i ../posix.src $*; mv $*.so.3 ../32bit.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   204
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   205
# localedef reads the 32bit library for function definitions
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   206
# and then links against the 64bit library, so we need both 32bit and 64bit versions
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   207
$(LOCALES:%=build/%/64bit.so.3): build/%/64bit.so.3: build/%/posix.src build/%/64bit/.methods_so build/%/64bit/$(MACH64)/.methods_so
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   208
	$(M)LOCALEDEF $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   209
	$(Q)cd $(@D)/64bit; $(LOCALEDEF) $(if $(Q),,-v) -P $(dir $(CC)) -W cc,"$(CFLAGS64)" -L "-R\\\$$ORIGIN" -m lp64 -x ../../../misc/$(call charmap, $*).x -f ../../$(call charmap, $*).cm -i ../posix.src $*; mv $*.so.3 ../64bit.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   210
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   211
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   212
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   213
# ******************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   214
# ==== Charmaps ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   215
# ******************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   216
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   217
CHARMAPS_NOUTF8 = $(filter-out UTF-8, $(CHARMAPS))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   218
$(CHARMAPS_NOUTF8:%=build/%.cm): build/%.cm: $(CLDR_TOOLS_DEPS) build/.dir build/.dtd_cache/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   219
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   220
	$(Q)$(GEN_CHARMAP) -d $(@D) -c $(call cldr_charmap,$*)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   221
	$(Q)[ "$(call charmap,$*)" = "$(call cldr_charmap,$*)" ] || mv build/$(call cldr_charmap,$*).cm $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   222
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   223
build/UTF-8.cm: $(CLDR_TOOLS_DEPS) build/.dir build/.dtd_cache/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   224
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   225
	$(Q)$(GEN_CHARMAP) -d $(@D) -c UTF-8 -u '$(UNICODESET)'
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   226
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   227
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   228
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   229
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   230
# *****************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   231
# ==== Other package files ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   232
# *****************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   233
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   234
# prototype
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   235
$(PKGS:%=build/%/prototype): build/%/prototype: build/%/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   236
	$(M)GENERATE $@
122
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   237
	$(Q)cat $^ | $(PERL) -ne 'print unless $$a{$$_}++' > $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   238
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   239
# manifest
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   240
$(PKGS:%=build/%/manifest): build/%/manifest: build/%/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   241
	$(M)GENERATE $@
122
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   242
	$(Q)cat $^ | $(PERL) -ne 'print unless $$a{$$_}++' > $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   243
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   244
# copyright
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   245
$(FILEROOT)/copyright.cddl+unicode: misc/copyright.cddl+unicode
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   246
	$(Q)[ -d $(@D) ] || mkdir -p $(@D)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   247
	$(Q)cp $< $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   248
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   249
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   250
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   251
# **********************************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   252
# ==== Read params from locale/*.spec files ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   253
# **********************************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   254
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   255
# FIXME: this section is a bit too tricky ... probably will be rewritten as scripts
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   256
cldr_variant = $(call add_ctype,$(call add_platform,$(call add_yesno,$(1))))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   257
sep = $(call contains,$(1),@,$(comma),@)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   258
add_ctype = $(1)$(call contains,$(1),copy_ctype,,$(call sep,$(1))copy_ctype=build/$(call charmap,$*).ctype)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   259
add_platform = $(1)$(call contains,$(1),platform=,,$(call sep,$(1))platform=solaris)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   260
add_yesno = $(1)$(call contains,$(1),yesno=,,$(call sep,$(1))yesno=solaris)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   261
122
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   262
spec_key = $(if $(shell $(PERL) -ne 'print 1 if /^$(1)\s/' $<),$(shell $(PERL) -ne 'print if s/^$(1)\s+(.*)/\1/' $<),$(2))
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   263
spec_key_is_set = $(if $(shell $(PERL) -ne 'print 1 if /^$(1)\s/' $<),\# $(1) is set,)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   264
spec_fkey = $(addprefix misc/templates/$(1)/,$(spec_key))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   265
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   266
# if $(1) contains $(2), return $(3) else $(4)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   267
contains = $(if $(filter-out xx,x$(subst $(1),,$(subst $(2),=-=,$(1))x)),$(3),$(4))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   268
comma := ,
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   269
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   270
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   271
EXPAND_ENV = LOC=$* \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   272
	     MACH=$(MACH) \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   273
	     MACH64=$(MACH64) \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   274
	     CHARMAP='$(call charmap,$*)' \
111
33aaab5040ad 6900712 [PSARC/2009/528] Remove obsolete short-form locales
hnhn
parents: 109
diff changeset
   275
	     LCMESSAGES='$(call spec_key,lc_messages,default)' \
33aaab5040ad 6900712 [PSARC/2009/528] Remove obsolete short-form locales
hnhn
parents: 109
diff changeset
   276
	     LCTIME='$(call spec_key,lc_time,default)' \
33aaab5040ad 6900712 [PSARC/2009/528] Remove obsolete short-form locales
hnhn
parents: 109
diff changeset
   277
	     IS_SET_LC_MESSAGES='$(call spec_key_is_set,lc_messages)' \
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   278
	     IS_SET_LC_TIME='$(call spec_key_is_set,lc_time)' \
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   279
	     DESCRIPTION='$(shell cat build/$*/pkg_description)'
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   280
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   281
$(LOCALES:%=build/%/pkg_name): build/%/pkg_name: locale/%.spec build/%/.dir
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   282
	$(M)GENERATE $@
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   283
	$(Q)echo "$(call spec_key,pkg_name,SUNWlang-$(firstword $(subst _, ,$*)))" >$@
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   284
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   285
$(LOCALES:%=build/%/cldr_variant): build/%/cldr_variant: locale/%.spec build/%/.dir
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   286
	$(M)GENERATE $@
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   287
	$(Q)echo "$(call cldr_variant,$(call spec_key,cldr_variant,$(call locale_xxYY,$*)))" > $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   288
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   289
$(LOCALES:%=build/%/pkg_description): build/%/pkg_description: build/%/locale_description build/%/.dir
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   290
	$(M)GENERATE $@
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   291
	$(Q)$(PERL) -pe 's/([^,]+),.*/\1/; s/\s*\(.*//; s/$$/ language support/' < $< > $@
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   292
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   293
$(LOCALES:%=build/%/locale_map): build/%/locale_map: locale/%.spec build/%/pkg_description
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   294
	$(M)GENERATE $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   295
	$(Q)for src in $(call spec_fkey,locale_map,default); do \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   296
		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   297
	done > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   298
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   299
$(LOCALES:%=build/%/locale_description): build/%/locale_description: locale/%.spec $(CLDR_TOOLS_DEPS) build/%/cldr_variant build/.dtd_cache/.src
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   300
	$(M)GENERATE $@
122
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   301
	$(Q)(if [ -z "$(shell $(PERL) -ne 'print if s/^locale_desc\s+(.*)/\1/' $<)" ] ; then \
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   302
			$(GEN_DESCRIPTION) build/cldr_core $(shell cat build/$*/cldr_variant); \
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   303
			echo " ($(call charmap,$*))"; \
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   304
		else \
122
8ff29aae866c fix weak regular expressions (if one key was prefix of another key, the key can be misinterpreted)
jenda
parents: 121
diff changeset
   305
			echo "$(shell $(PERL) -ne 'print if s/^locale_desc\s+(.*)/\1/' $<)"; \
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   306
		fi) > $@
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   307
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   308
$(LOCALES:%=build/%/prototype): build/%/prototype: locale/%.spec build/%/pkg_description
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   309
	$(M)GENERATE $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   310
	$(Q)for src in $(call spec_fkey,prototype,utf8); do \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   311
		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   312
	done > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   313
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   314
$(LOCALES:%=build/%/manifest): build/%/manifest: locale/%.spec build/%/pkg_description
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   315
	$(M)GENERATE $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   316
	$(Q)for src in $(call spec_fkey,manifest,header_lang utf8); do \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   317
		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   318
	done > $@
123
a99c85250563 improve manifests for IPS migration: one-locale packages dependencies
jenda
parents: 122
diff changeset
   319
	$(Q)echo $(call spec_key,manifest_raw,) >> $@
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   320
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   321
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   322
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   323
# ********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   324
# ==== Install/Build packages ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   325
# ********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   326
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   327
.PHONY: install_svr4 install_ips
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   328
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   329
install_svr4: build/pkgs.d $(PKGS:%=build/%/.installed_svr4)
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   330
install_ips: build/pkgs.d $(PKGS:%=build/%/.installed_ips)
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   331
pkgsend_ips: build/pkgs.d $(PKGS:%=build/%/.pkgsend)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   332
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   333
117
fbb3551be55e make ips generates manifests with the same list of files as svr4 prototypes
jenda
parents: 116
diff changeset
   334
$(LOCALES:%=build/%/.installed): build/%/.installed: build/%/.installed_locale_object_32 build/%/.installed_locale_object_64 build/%/.installed_locale_description build/%/.installed_locale_map
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   335
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   336
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   337
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   338
$(LOCALES:%=build/%/.installed_locale_object_32): build/%/.installed_locale_object_32: build/%/32bit.so.3 $(FILEROOT)/usr/lib/locale/%/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   339
	$(M)INSTALL $*.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   340
	$(Q)cp build/$*/32bit.so.3 $(FILEROOT)/usr/lib/locale/$*/$*.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   341
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   342
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   343
$(LOCALES:%=build/%/.installed_locale_object_64): build/%/.installed_locale_object_64: build/%/64bit.so.3 $(FILEROOT)/usr/lib/locale/%/$(MACH64)/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   344
	$(M)INSTALL $(MACH64)/$*.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   345
	$(Q)cp build/$*/64bit.so.3 $(FILEROOT)/usr/lib/locale/$*/$(MACH64)/$*.so.3
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   346
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   347
109
320c2bdeb88b Makefile: fix typo in .installed_locale_description and .installed_locale_map targets
jenda
parents: 108
diff changeset
   348
$(LOCALES:%=build/%/.installed_locale_description): build/%/.installed_locale_description: build/%/locale_description $(FILEROOT)/usr/lib/locale/%/.dir
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   349
	$(M)INSTALL $*/locale_description
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   350
	$(Q)cp build/$*/locale_description $(FILEROOT)/usr/lib/locale/$*/
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   351
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   352
	
109
320c2bdeb88b Makefile: fix typo in .installed_locale_description and .installed_locale_map targets
jenda
parents: 108
diff changeset
   353
$(LOCALES:%=build/%/.installed_locale_map): build/%/.installed_locale_map: build/%/locale_map $(FILEROOT)/usr/lib/locale/%/.dir
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   354
	$(M)INSTALL $*/locale_map
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   355
	$(Q)cp build/$*/locale_map $(FILEROOT)/usr/lib/locale/$*/
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   356
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   357
	
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   358
$(PKGS:%=build/%/.installed_svr4): build/%/.installed_svr4: build/%/prototype build/%/.installed
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   359
	$(M)INSTALL $*/prototype
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   360
	$(Q)[ -d pkgmaps/locale ] || mkdir -p pkgmaps/locale
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   361
	$(Q)cp $< pkgmaps/locale/prototype.$(subst SUNW,,$*)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   362
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   363
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   364
$(PKGS:%=build/%/.installed_ips): build/%/.installed_ips: build/%/manifest build/%/.installed $(FILEROOT)/copyright.cddl+unicode
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   365
	$(M)INSTALL $*/manifest
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   366
	$(Q)[ -d pkgmaps/locale ] || mkdir -p pkgmaps/locale
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   367
	$(Q)cp $< pkgmaps/locale/manifest.$(subst SUNW,,$*)
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   368
	$(Q)touch $@
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   369
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   370
$(PKGS:%=build/%/.pkgsend): build/%/.pkgsend: build/%/.installed_ips
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   371
	$(M)PKGSEND $*
118
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   372
	$(Q)(eval `pkgsend -s $(PKG_REPO) open $*@0.5.11,5.11-0.111` && \
686cb5e09cd5 "ips" and "install_ips" targets copy files and manifests only, new target "pkgsend" publishes pkgs to ips
jenda
parents: 117
diff changeset
   373
		pkgsend -s $(PKG_REPO) include -d $(FILEROOT) build/$*/manifest; \
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   374
		pkgsend -s $(PKG_REPO) close) $(if $(Q), >/dev/null)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   375
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   376
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   377
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   378
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   379
# *********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   380
# ==== Compile the build tools ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   381
# *********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   382
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   383
classpath = $(subst $() $(),:,$(filter %.jar,$^))
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   384
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   385
# xalan
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   386
build/xalan/.src: downloads/$(XALAN_SOURCE)
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   387
	$(M)UNPACK $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   388
	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   389
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   390
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   391
build/xalan.jar: build/xalan/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   392
	$(M)INSTALL $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   393
	$(Q)cp build/xalan/xalan-j_2_7_1/xalan.jar $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   394
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   395
build/xml-apis.jar: build/xalan/.src
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   396
	$(M)INSTALL $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   397
	$(Q)cp build/xalan/xalan-j_2_7_1/xml-apis.jar $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   398
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   399
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   400
# icu4j
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   401
build/icu4j/.unpack: downloads/$(ICU4J_SOURCE) 
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   402
	$(M)UNPACK $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   403
	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   404
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   405
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   406
build/icu4j/.src: build/icu4j/.unpack misc/patches/icu4j/$(ICU4J_VERSION)/*.patch
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   407
	$(M)PATCH icu4j
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   408
	$(Q)for a in $(filter %.patch, $(sort $^)); do  \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   409
		(cd $(@D); $(GNU_PATCH) -p1 $(if $(Q),-s)) < $$a; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   410
	done
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   411
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   412
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   413
build/icu4j/.compiled: build/icu4j/.src
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   414
	$(M)COMPILE $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   415
	$(Q)cd $(@D); $(ANT) $(if $(Q),-q) jar cldrUtil
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   416
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   417
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   418
build/utilities.jar: build/icu4j/.compiled
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   419
	$(M)INSTALL $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   420
	$(Q)cp build/icu4j/utilities.jar $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   421
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   422
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   423
build/icu4j.jar: build/icu4j/.compiled 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   424
	$(M)INSTALL $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   425
	$(Q)cp build/icu4j/icu4j.jar $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   426
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   427
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   428
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   429
# cldr_tools
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   430
build/cldr_tools/.unpack: downloads/$(CLDR_TOOLS_SOURCE)
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   431
	$(M)UNPACK $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   432
	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   433
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   434
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   435
build/cldr_tools/.src: build/cldr_tools/.unpack misc/patches/cldr_tools/$(CLDR_VERSION)/*.patch
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   436
	$(M)PATCH $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   437
	$(Q)find $(@D) -type f -exec perl -pi -e 's,\r$$,,' {} \;
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   438
	$(Q)for a in $(filter %.patch, $(sort $^)); do  \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   439
		(cd $(@D); $(GNU_PATCH) -p1 $(if $(Q),-s)) < $$a; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   440
	done
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   441
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   442
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   443
build/cldr_tools/.compiled: build/icu4j.jar build/utilities.jar build/xalan.jar build/xml-apis.jar build/cldr_tools/.src
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   444
	$(M)COMPILE $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   445
	$(Q)cd $(@D)/tools/java; ICU4J_JAR=../../../icu4j.jar UTILITIES_JAR=../../../utilities.jar CLDR_JAR=../../../xalan.jar XML_APIS_JAR=../../../xml-apis.jar $(ANT) $(if $(Q),-q) jar
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   446
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   447
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   448
build/cldr.jar: build/cldr_tools/.compiled 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   449
	$(M)INSTALL $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   450
	$(Q)cp build/cldr_tools/tools/java/cldr.jar $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   451
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   452
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   453
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   454
# cldr_core
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   455
build/cldr_core/.unpack: downloads/$(CLDR_CORE_SOURCE)
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   456
	$(M)UNPACK $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   457
	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   458
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   459
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   460
build/cldr_core/.src: build/cldr_core/.unpack misc/patches/cldr_core/$(CLDR_VERSION)/*.patch
116
54bc75ad88c9 minor Makefile reorder and fix small typos in buildlog messages
jenda
parents: 115
diff changeset
   461
	$(M)PATCH $(@D)
108
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   462
	$(Q)find $(@D) -type f -exec perl -pi -e 's,\r$$,,' {} \;
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   463
	$(Q)mv build/cldr_core/common/* build/cldr_core/
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   464
	$(Q)for a in $(filter %.patch, $(sort $^)); do  \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   465
		(cd $(@D); $(GNU_PATCH) -p1 $(if $(Q),-s)) < $$a; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   466
	done
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   467
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   468
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   469
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   470
# ldump and cmprint 
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   471
build/cmap.c: tools/cmap.pl $(CHARMAPS:%=build/%.cm)
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   472
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   473
	$(Q)tools/cmap.pl $(filter %.cm,$^) > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   474
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   475
build/cmap.o: build/cmap.c
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   476
	$(M)CC $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   477
	$(Q)$(CC) -c -o $@ $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   478
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   479
build/%.o: tools/%.c
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   480
	$(M)CC $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   481
	$(Q)$(CC) -c -o $@ $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   482
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   483
build/ldump: build/ldump.o build/cmap.o
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   484
	$(M)BUILD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   485
	$(Q)$(CC) -o $@ $^
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   486
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   487
build/cmprint: build/cmprint.o build/cmap.o
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   488
	$(M)BUILD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   489
	$(Q)$(CC) -o $@ $^
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   490
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   491
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   492
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   493
# *************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   494
# ==== Pack and Unpack ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   495
# *************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   496
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   497
build/.dtd_cache/.src: downloads/$(CLDR_DTD_SOURCE) build/.dtd_cache/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   498
	$(M)UNPACK $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   499
	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   500
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   501
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   502
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   503
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   504
# ***********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   505
# ==== Download sources from net ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   506
# ***********************************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   507
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   508
downloads/$(CLDR_CORE_SOURCE): downloads/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   509
	$(M)DOWNLOAD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   510
	$(Q)if [ -f $(DOWNLOADS)/$(@F) ]; then \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   511
		cp $(DOWNLOADS)/$(@F) $(@D); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   512
	else \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   513
		$(WGET) $(if $(Q),-q) -O $@ $(CLDR_CORE_SITE); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   514
	fi
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   515
	$(Q)touch -c $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   516
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   517
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   518
downloads/$(CLDR_TOOLS_SOURCE): downloads/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   519
	$(M)DOWNLOAD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   520
	$(Q)if [ -f $(DOWNLOADS)/$(@F) ]; then \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   521
		cp $(DOWNLOADS)/$(@F) $(@D); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   522
	else \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   523
		$(WGET) $(if $(Q),-q) -O $@ $(CLDR_TOOLS_SITE); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   524
	fi
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   525
	$(Q)touch -c $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   526
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   527
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   528
downloads/$(ICU4J_SOURCE): downloads/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   529
	$(M)DOWNLOAD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   530
	$(Q)if [ -f $(DOWNLOADS)/$(@F) ]; then \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   531
		cp $(DOWNLOADS)/$(@F) $(@D); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   532
	else \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   533
		$(WGET) $(if $(Q),-q) -O $@ $(ICU4J_SITE); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   534
	fi
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   535
	$(Q)touch -c $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   536
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   537
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   538
downloads/$(XALAN_SOURCE): downloads/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   539
	$(M)DOWNLOAD $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   540
	$(Q)if [ -f $(DOWNLOADS)/$(@F) ]; then \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   541
		cp $(DOWNLOADS)/$(@F) $(@D); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   542
	else \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   543
		$(WGET) $(if $(Q),-q) -O $@ $(XALAN_SITE); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   544
	fi
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   545
	$(Q)touch -c $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   546
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   547
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   548
# workaround for race condition in org.unicode.cldr.util.CachingEntityResolver
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   549
# - if more than one process use build/.dtd_cache dir, the second process could
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   550
# receive uncomplete dtd and parallel build could fail
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   551
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   552
downloads/$(CLDR_DTD_SOURCE): downloads/.dir $(CLDR_TOOLS_DEPS) build/.dtd_cache/.dir
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   553
	$(M)DOWNLOAD DTDs
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   554
	$(Q)if [ -f $(DOWNLOADS)/$(@F) ]; then \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   555
		cp $(DOWNLOADS)/$(@F) $(@D); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   556
	else \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   557
		$(XMLVALIDATOR) build/cldr_core/main/en.xml > /dev/null; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   558
		$(XMLVALIDATOR) build/cldr_core/supplemental/supplementalData.xml > /dev/null; \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   559
		(cd build/.dtd_cache/; $(ZIP) $(if $(Q),-q) -o ../../$(@) *.dtd); \
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   560
	fi
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   561
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   562
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   563
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   564
# **************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   565
# ==== Misc ====
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   566
# **************
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   567
%/.dir:
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   568
	$(Q)mkdir -p "$*"
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   569
	$(Q)touch $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   570
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   571
build/UTF-8.ctype: misc/unicode.ctype
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   572
	$(Q)cp $< $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   573
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   574
$(CHARMAPS_NOUTF8:%=build/%.ctype): build/%.ctype: build/%.cm misc/unicode.ctype tools/ctype.pl
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   575
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   576
	$(Q)tools/ctype.pl $< misc/unicode.ctype > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   577
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   578
build/report_diff.html: all build/ldump tools/report_diff.pl
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   579
	$(M)GENERATE $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   580
	$(Q)tools/report_diff.pl $(LOCALES) > $@
bdf1f0a15884 re-order and simplify Makefiles - less internal functions, no includes, ...
jenda
parents: 95
diff changeset
   581
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   582
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   583
METHODS_SO = methods_unicode.so.3
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   584
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   585
build/.methods_so: build/32bit/.dir build/64bit/.dir
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   586
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   587
ifeq ($(wildcard $(FILEROOT)/usr/lib/locale/common/$(METHODS_SO)),)
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   588
build/.methods_so:
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   589
	$(M)COPY_SYSTEM $(METHODS_SO)
119
ee584b50490d re-make could fail to copy methods_unicode.so, fixed
jenda
parents: 118
diff changeset
   590
	$(Q)cp -f /usr/lib/locale/common/$(METHODS_SO) build/32bit/
ee584b50490d re-make could fail to copy methods_unicode.so, fixed
jenda
parents: 118
diff changeset
   591
	$(Q)cp -f /usr/lib/locale/common/$(MACH64)/$(METHODS_SO) build/64bit/
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   592
	$(Q)touch $@
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   593
else
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   594
build/.methods_so: $(FILEROOT)/usr/lib/locale/common/$(METHODS_SO) $(FILEROOT)/usr/lib/locale/common/$(MACH64)/$(METHODS_SO)
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   595
	$(M)COPY $(METHODS_SO)
119
ee584b50490d re-make could fail to copy methods_unicode.so, fixed
jenda
parents: 118
diff changeset
   596
	$(Q)cp -f $(FILEROOT)/usr/lib/locale/common/$(METHODS_SO) build/32bit/
ee584b50490d re-make could fail to copy methods_unicode.so, fixed
jenda
parents: 118
diff changeset
   597
	$(Q)cp -f $(FILEROOT)/usr/lib/locale/common/$(MACH64)/$(METHODS_SO) build/64bit/
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   598
	$(Q)touch $@
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   599
endif
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   600
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   601
$(LOCALES:%=build/%/32bit/.methods_so) $(LOCALES:%=build/%/64bit/.methods_so): build/%/.methods_so: build/.methods_so build/%/.dir
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   602
	$(M)LINK $(@D)/$(METHODS_SO)
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   603
	$(Q)rm -f build/$*/$(METHODS_SO)
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   604
	$(Q)cp build/32bit/$(METHODS_SO) build/$*/$(METHODS_SO)
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   605
	$(Q)touch $@
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   606
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   607
$(LOCALES:%=build/%/64bit/$(MACH64)/.methods_so): build/%/.methods_so: build/.methods_so build/%/.dir
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   608
	$(M)LINK $(@D)/$(METHODS_SO)
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   609
	$(Q)rm -f build/$*/$(METHODS_SO)
121
1ef1a0fe5f25 %/.dir target does not work well in parallel build
jenda
parents: 119
diff changeset
   610
	$(Q)cp build/64bit/$(METHODS_SO) build/$*/$(METHODS_SO)
113
68608e19b3f8 6972031 build locales against built methods*so, not system's methods*so
hnhn
parents: 111
diff changeset
   611
	$(Q)touch $@