]> git.saurik.com Git - apple/icu.git/blob - icuSources/tools/genrb/Makefile.in
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / tools / genrb / Makefile.in
1 ## Makefile.in for ICU - tools/genrb
2 ## Copyright (c) 1999-2008, International Business Machines Corporation and
3 ## others. All Rights Reserved.
4
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
28 ## Source directory information
29 srcdir = @srcdir@
30 top_srcdir = @top_srcdir@
31
32 top_builddir = ../..
33
34 include $(top_builddir)/icudefs.mk
35
36 ## Build directory information
37 subdir = tools/genrb
38
39 TARGET_STUB_NAME = genrb
40 DERB_STUB_NAME = derb
41
42 SECTION = 1
43
44 MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION)
45
46
47 ## Extra files to remove for 'make clean'
48 CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS)
49
50 ## Target information
51 TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
52 DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT)
53
54 ifneq ($(top_builddir),$(top_srcdir))
55 CPPFLAGS += -I$(top_builddir)/common
56 endif
57 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
58 LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
59
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
62 DERB_OBJ = derb.o
63
64 DEPS = $(OBJECTS:.o=.d)
65 DERB_DEPS = $(DERB_OBJ:.o=.d)
66
67 # build-icu4j variables
68 GENDTJAR_ICUHOME=$(shell pwd)/../../..
69 GENDTJAR_OPTS=--icu-root="$(GENDTJAR_ICUHOME)" --jar="$(GENDTJAR_JARHOME)" --icu4j-root="$(ICU4J_HOME)" --verbose
70 GENDTJAR_TEMP=./temp/
71 GENDTJAR=$(srcdir)/gendtjar.pl
72
73 -include Makefile.local
74
75 ifeq (,$(ICU4J_HOME))
76 ICU4J_HOME=$(shell pwd)/icu4j
77 endif
78
79
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 \
83 build-icu4j
84
85 ## Clear suffix list
86 .SUFFIXES :
87
88 ## List of standard targets
89 all: all-local
90 install: install-local
91 clean: clean-local
92 distclean : distclean-local
93 dist: dist-local
94 check: all check-local
95
96 all-local: $(TARGET) $(DERB) $(MAN_FILES)
97
98 install-local: all-local install-man
99 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
100 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
101 $(INSTALL) $(DERB) $(DESTDIR)$(bindir)
102
103 install-man: $(MAN_FILES)
104 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
105 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
106
107 dist-local:
108
109 clean-local:
110 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
111 $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP)
112
113 distclean-local: clean-local
114 $(RMV) Makefile
115
116 check-local: all-local
117
118 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
119 cd $(top_builddir) \
120 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
121
122 $(TARGET) : $(OBJECTS)
123 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
124 $(POST_BUILD_STEP)
125
126 $(DERB) : $(DERB_OBJ)
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
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)
142
143
144 # This line is needed to serialize builds when the gmake -j option is used.
145 $(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION)
146
147 %.$(SECTION): $(srcdir)/%.$(SECTION).in
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
151
152 ifeq (,$(MAKECMDGOALS))
153 -include $(DEPS)
154 -include $(DERB_DEPS)
155 else
156 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
157 -include $(DEPS)
158 endif
159 endif
160