]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/genrb/Makefile.in
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / tools / genrb / Makefile.in
CommitLineData
b75a7d8f 1## Makefile.in for ICU - tools/genrb
46f4442e 2## Copyright (c) 1999-2008, International Business Machines Corporation and
b75a7d8f
A
3## others. All Rights Reserved.
4
46f4442e
A
5# SIMPLIFIED WAY TO BUILD ICU4J DATA FROM C
6#
7# Note: do NOT edit this file, Makefile or Makefile.in
8# Create a new file, Makefile.local
9#
10# 1. Need to set the following variable in Makefile.local:
11#
12# ICU4J_HOME example: ICU4J_HOME=/home/srl/icu4j
13# Path to your icu4j directory. Should contain build.xml
14# If not set, will create a 'icu4j' directory in source/tools/genrb/icu4j
15#
16# 2. The next variable can be set by uncommenting and copying the following line to your Makefile.local.GENDTJAR_JARHOME
17#
18## GENDTJAR_JARHOME:=$(shell dirname `which jar`)
19## (uncomment the above line and copy to Makefile.local)
20#
21# GENDTJAR_JARHOME is the directory containing the 'jar' binary, such as /usr/bin
22#
23#
24# 3. Now, you can run 'make build-icu4j' from icu/source/data (convenience)
25# or icu/source/tools/genrb (this directory)
26
27
b75a7d8f
A
28## Source directory information
29srcdir = @srcdir@
30top_srcdir = @top_srcdir@
31
32top_builddir = ../..
33
34include $(top_builddir)/icudefs.mk
35
73c04bcf
A
36## Build directory information
37subdir = tools/genrb
b75a7d8f 38
374ca955
A
39TARGET_STUB_NAME = genrb
40DERB_STUB_NAME = derb
41
b75a7d8f
A
42SECTION = 1
43
374ca955 44MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION)
b75a7d8f 45
b75a7d8f
A
46
47## Extra files to remove for 'make clean'
374ca955 48CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS)
b75a7d8f
A
49
50## Target information
374ca955
A
51TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
52DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT)
b75a7d8f 53
73c04bcf
A
54ifneq ($(top_builddir),$(top_srcdir))
55CPPFLAGS += -I$(top_builddir)/common
56endif
57CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
b75a7d8f
A
58LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
59
73c04bcf 60OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \
374ca955 61wrtjava.o rle.o wrtxml.o prscmnts.o
b75a7d8f
A
62DERB_OBJ = derb.o
63
64DEPS = $(OBJECTS:.o=.d)
65DERB_DEPS = $(DERB_OBJ:.o=.d)
66
46f4442e
A
67# build-icu4j variables
68GENDTJAR_ICUHOME=$(shell pwd)/../../..
69GENDTJAR_OPTS=--icu-root="$(GENDTJAR_ICUHOME)" --jar="$(GENDTJAR_JARHOME)" --icu4j-root="$(ICU4J_HOME)" --verbose
70GENDTJAR_TEMP=./temp/
71GENDTJAR=$(srcdir)/gendtjar.pl
72
73-include Makefile.local
74
75ifeq (,$(ICU4J_HOME))
76ICU4J_HOME=$(shell pwd)/icu4j
77endif
78
79
b75a7d8f
A
80## List of phony targets
81.PHONY : all all-local install install-local clean clean-local \
46f4442e
A
82distclean distclean-local dist dist-local check check-local install-man \
83build-icu4j
b75a7d8f
A
84
85## Clear suffix list
86.SUFFIXES :
87
88## List of standard targets
89all: all-local
90install: install-local
91clean: clean-local
92distclean : distclean-local
93dist: dist-local
94check: all check-local
95
96all-local: $(TARGET) $(DERB) $(MAN_FILES)
97
98install-local: all-local install-man
99 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
100 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
101 $(INSTALL) $(DERB) $(DESTDIR)$(bindir)
102
73c04bcf
A
103install-man: $(MAN_FILES)
104 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
105 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
106
374ca955 107dist-local:
b75a7d8f 108
73c04bcf 109clean-local:
b75a7d8f 110 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
46f4442e 111 $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP)
b75a7d8f
A
112
113distclean-local: clean-local
114 $(RMV) Makefile
115
116check-local: all-local
117
118Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
119 cd $(top_builddir) \
120 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
121
122$(TARGET) : $(OBJECTS)
374ca955 123 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
46f4442e 124 $(POST_BUILD_STEP)
b75a7d8f
A
125
126$(DERB) : $(DERB_OBJ)
46f4442e
A
127 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
128 $(POST_BUILD_STEP)
129
130$(GENDTJAR_JARHOME)/jar:
131 @echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in
132 exit 1
133
134$(ICU4J_HOME)/build.xml:
135 @echo warning: $@ not found - make sure ICU4J_HOME is set.
136
137build-icu4j: $(GENDTJAR) $(ICU4J_HOME)/build.xml $(GENDTJAR_JARHOME)/jar
138 # clean up old temp files
139 -$(RMV) $(GENDTJAR_TEMP)
140 perl $(GENDTJAR) $(GENDTJAR_OPTS)
141 @echo Finished building to $(ICU4J_HOME)
b75a7d8f
A
142
143
374ca955
A
144# This line is needed to serialize builds when the gmake -j option is used.
145$(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION)
b75a7d8f
A
146
147%.$(SECTION): $(srcdir)/%.$(SECTION).in
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
b75a7d8f
A
151
152ifeq (,$(MAKECMDGOALS))
153-include $(DEPS)
154-include $(DERB_DEPS)
155else
156ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
157-include $(DEPS)
158endif
159endif
160