locale/make.mk
author jenda
Fri, 28 Aug 2009 21:06:50 +0200
changeset 31 4494cec780b5
parent 30 a1878e39c19f
child 35 f7295b710b0e
permissions -rw-r--r--
add install target to Makefile
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     1
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     2
# CDDL HEADER START
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     3
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     4
# The contents of this file are subject to the terms of the
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     5
# Common Development and Distribution License (the "License").  
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     6
# You may not use this file except in compliance with the License.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     7
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     8
# You can obtain a copy of the license at OPENSOLARIS.LICENSE
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    10
# See the License for the specific language governing permissions
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    11
# and limitations under the License.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    12
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    14
# file and include the License file at OPENSOLARIS.LICENSE.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    18
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    19
# CDDL HEADER END
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    20
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    21
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    22
# Use is subject to license terms.
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    23
#
1db559ddf29a add and/or fix CDDL headers
jenda
parents: 26
diff changeset
    24
30
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    25
charmap = $(firstword $(subst @, ,$(lastword $(subst ., ,$(1)))))
26
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    26
30
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    27
quiet_cmd_localedef32 = LOCALEDEF $@
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    28
      cmd_localedef32 = (cd $(@D); $(LOCALEDEF) $(LOCALEDEFFLAGS32) -x ../../misc/$(call charmap, $*).x -f ../../locale/charmap/$(call charmap, $*).cm -i ../../$< $*)
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    29
quiet_cmd_localedef64 = LOCALEDEF $@
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    30
      cmd_localedef64 = (cd $(@D); $(LOCALEDEF) $(LOCALEDEFFLAGS64) -x ../../misc/$(call charmap, $*).x -f ../../locale/charmap/$(call charmap, $*).cm -i ../../$< $*)
26
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    31
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    32
30
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    33
.SECONDEXPANSION: $(LOCALES:%=locale/32/%.so.3) $(LOCALES:%=locale/64/%.so.3)
26
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    34
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    35
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    36
$(LOCALES:%=locale/32/%.so.3): locale/32/%.so.3: locale/src/%.src locale/charmap/$$(call charmap,$$*).cm misc/$$(call charmap,$$*).x locale/32/.dir
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    37
	$(call cmd,localedef32)
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    38
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    39
$(LOCALES:%=locale/64/%.so.3): locale/64/%.so.3: locale/src/%.src locale/charmap/$$(call charmap,$$*).cm misc/$$(call charmap,$$*).x locale/64/.dir
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    40
	$(call cmd,localedef64)
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    41
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    42
31
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    43
$(LOCALES:%=fileroot/usr/lib/locale/%/.installed): fileroot/usr/lib/locale/%/.installed: locale/32/%.so.3 locale/64/%.so.3 fileroot/usr/lib/locale/%/.dir fileroot/usr/lib/locale/%/$(MACH64)/.dir
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    44
	$(Q)cp locale/32/$*.so.3 $(@D)/
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    45
	$(Q)cp locale/64/$*.so.3 $(@D)/$(MACH64)/
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    46
	$(Q)touch $@
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    47
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    48
4494cec780b5 add install target to Makefile
jenda
parents: 30
diff changeset
    49
CLEAN += locale/32 locale/64 $(LOCALES:%=fileroot/usr/lib/locale/%)
30
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    50
a1878e39c19f aesthetic adjustments in makefiles
jenda
parents: 29
diff changeset
    51
26
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    52
include locale/src/make.mk
cade4546c172 migrate from g11n-oso to standalone ws and from ccs/make to gnu make
jenda
parents:
diff changeset
    53
include locale/charmap/make.mk