1 ## Makefile.in for ICU - tools/genrb
2 ## Copyright (c) 1999-2008, International Business Machines Corporation and
3 ## others. All Rights Reserved.
5 # SIMPLIFIED WAY TO BUILD ICU4J DATA FROM C
7 # Note: do NOT edit this file, Makefile or Makefile.in
8 # Create a new file, Makefile.local
10 # 1. Need to set the following variable in Makefile.local:
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
16 # 2. The next variable can be set by uncommenting and copying the following line to your Makefile.local.GENDTJAR_JARHOME
18 ## GENDTJAR_JARHOME:=$(shell dirname `which jar`)
19 ## (uncomment the above line and copy to Makefile.local)
21 # GENDTJAR_JARHOME is the directory containing the 'jar' binary, such as /usr/bin
24 # 3. Now, you can run 'make build-icu4j' from icu/source/data (convenience)
25 # or icu/source/tools/genrb (this directory)
28 ## Source directory information
30 top_srcdir = @top_srcdir@
34 include $(top_builddir)/icudefs.mk
36 ## Build directory information
39 TARGET_STUB_NAME = genrb
44 MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION)
47 ## Extra files to remove for 'make clean'
48 CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS)
51 TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
52 DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT)
54 ifneq ($(top_builddir),$(top_srcdir))
55 CPPFLAGS += -I$(top_builddir)/common
57 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
58 LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
60 OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \
61 wrtjava.o rle.o wrtxml.o prscmnts.o
64 DEPS = $(OBJECTS:.o=.d)
65 DERB_DEPS = $(DERB_OBJ:.o=.d)
67 # build-icu4j variables
68 GENDTJAR_ICUHOME=$(shell pwd)/../../..
69 GENDTJAR_OPTS=--icu-root="$(GENDTJAR_ICUHOME)" --jar="$(GENDTJAR_JARHOME)" --icu4j-root="$(ICU4J_HOME)" --verbose
71 GENDTJAR=$(srcdir)/gendtjar.pl
73 -include Makefile.local
76 ICU4J_HOME=$(shell pwd)/icu4j
80 ## List of phony targets
81 .PHONY : all all-local install install-local clean clean-local \
82 distclean distclean-local dist dist-local check check-local install-man \
88 ## List of standard targets
90 install: install-local
92 distclean : distclean-local
94 check: all check-local
96 all-local: $(TARGET) $(DERB) $(MAN_FILES)
98 install-local: all-local install-man
99 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
100 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
101 $(INSTALL) $(DERB) $(DESTDIR)$(bindir)
103 install-man: $(MAN_FILES)
104 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
105 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
110 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
111 $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP)
113 distclean-local: clean-local
116 check-local: all-local
118 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
120 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
122 $(TARGET) : $(OBJECTS)
123 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
126 $(DERB) : $(DERB_OBJ)
127 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
130 $(GENDTJAR_JARHOME)/jar:
131 @echo $@ not found - make sure GENDTJAR_JARHOME is set. See Makefile.in
134 $(ICU4J_HOME)/build.xml:
135 @echo warning: $@ not found - make sure ICU4J_HOME is set.
137 build-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)
144 # This line is needed to serialize builds when the gmake -j option is used.
145 $(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION)
147 %.$(SECTION): $(srcdir)/%.$(SECTION).in
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
152 ifeq (,$(MAKECMDGOALS))
154 -include $(DERB_DEPS)
156 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)