]>
Commit | Line | Data |
---|---|---|
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 |
29 | srcdir = @srcdir@ | |
30 | top_srcdir = @top_srcdir@ | |
31 | ||
32 | top_builddir = ../.. | |
33 | ||
34 | include $(top_builddir)/icudefs.mk | |
35 | ||
73c04bcf A |
36 | ## Build directory information |
37 | subdir = tools/genrb | |
b75a7d8f | 38 | |
374ca955 A |
39 | TARGET_STUB_NAME = genrb |
40 | DERB_STUB_NAME = derb | |
41 | ||
b75a7d8f A |
42 | SECTION = 1 |
43 | ||
374ca955 | 44 | MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) $(DERB_STUB_NAME).$(SECTION) |
b75a7d8f | 45 | |
b75a7d8f A |
46 | |
47 | ## Extra files to remove for 'make clean' | |
374ca955 | 48 | CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS) |
b75a7d8f A |
49 | |
50 | ## Target information | |
374ca955 A |
51 | TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT) |
52 | DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT) | |
b75a7d8f | 53 | |
73c04bcf A |
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 | |
b75a7d8f A |
58 | LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) |
59 | ||
73c04bcf | 60 | OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \ |
374ca955 | 61 | wrtjava.o rle.o wrtxml.o prscmnts.o |
b75a7d8f A |
62 | DERB_OBJ = derb.o |
63 | ||
64 | DEPS = $(OBJECTS:.o=.d) | |
65 | DERB_DEPS = $(DERB_OBJ:.o=.d) | |
66 | ||
46f4442e A |
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 | ||
b75a7d8f A |
80 | ## List of phony targets |
81 | .PHONY : all all-local install install-local clean clean-local \ | |
46f4442e A |
82 | distclean distclean-local dist dist-local check check-local install-man \ |
83 | build-icu4j | |
b75a7d8f A |
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 | ||
73c04bcf A |
103 | install-man: $(MAN_FILES) |
104 | $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) | |
105 | $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) | |
106 | ||
374ca955 | 107 | dist-local: |
b75a7d8f | 108 | |
73c04bcf | 109 | clean-local: |
b75a7d8f | 110 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) |
46f4442e | 111 | $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) $(GENDTJAR_TEMP) |
b75a7d8f A |
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) | |
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 | ||
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) | |
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 | |
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 |