]> git.saurik.com Git - apple/icu.git/blob - icuSources/Makefile.in
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / Makefile.in
1 #******************************************************************************
2 #
3 # Copyright (C) 1998-2016, International Business Machines
4 # Corporation and others. All Rights Reserved.
5 #
6 #******************************************************************************
7 ## Top-level Makefile.in for ICU
8 ## Stephen F. Booth
9
10 srcdir = @srcdir@
11 top_srcdir = @top_srcdir@
12
13 top_builddir = .
14
15 include $(top_builddir)/icudefs.mk
16
17 docdir = $(datadir)/doc
18 docsubdir = $(PACKAGE)$(ICULIBDASHSUFFIX)/html
19 docfilesdir = doc/html
20 docfiles = $(docfilesdir)/*.png $(docfilesdir)/*.html $(docfilesdir)/*.css $(docfilesdir)/*.tag
21 docsrchdir = $(docfilesdir)/search
22 docsrchfiles = $(docsrchdir)/*
23
24 ##
25
26 ## Build directory information
27 subdir = .
28
29 #AUTOCONF = @AUTOCONF@
30
31 ## Optional directory setup
32 @LAYOUT_TRUE@LAYOUT = layout
33 @LAYOUTEX_TRUE@LAYOUTEX = layoutex
34 @ICUIO_TRUE@ICUIO = io
35 @EXTRAS_TRUE@EXTRA = extra
36 @TESTS_TRUE@TEST = test
37 @SAMPLES_TRUE@SAMPLE = samples
38 @TOOLS_TRUE@TOOLS = tools
39
40 ## pkgconfig setup. Always have uc and i18n. Others are optional.
41 ALL_PKGCONFIG_SUFFIX=uc i18n
42 @LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX+= le
43 @LAYOUTEX_TRUE@ALL_PKGCONFIG_SUFFIX+= lx
44 @ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX+= io
45
46 DOXYGEN = @DOXYGEN@
47 DOCZIP = icu-docs.zip
48
49 ## Files to remove for 'make clean'
50 CLEANFILES = *~
51
52 ALL_PKGCONFIG_FILES=$(ALL_PKGCONFIG_SUFFIX:%=$(top_builddir)/config/icu-%.pc)
53
54 ## Files built (autoconfed) and installed
55 INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config @platform_make_fragment@ $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%) $(ALL_PKGCONFIG_FILES)
56
57 ## Files built (autoconfed) but not installed
58 LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc
59
60 DOCDIRS = common i18n
61 SUBDIRS = stubdata common i18n $(LAYOUT) $(LAYOUTEX) $(ICUIO) $(TOOLS) data $(EXTRA) $(SAMPLE) $(TEST)
62
63 SECTION = 1
64
65 MANX_FILES = config/icu-config.$(SECTION)
66
67 ALL_MAN_FILES = $(MANX_FILES)
68
69 ## Extra files to install [nothing at present]
70 EXTRA_DATA =
71
72 ## List of phony targets
73 .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
74 install-recursive clean clean-local clean-recursive distclean \
75 distclean-local distclean-recursive doc dist dist-local dist-recursive \
76 check check-local check-recursive clean-recursive-with-twist install-icu \
77 doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
78 check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
79
80 ## Clear suffix list
81 .SUFFIXES :
82
83 ## List of standard targets
84 all: all-local all-recursive
85 install: install-recursive install-local
86 clean: clean-recursive-with-twist clean-local
87 distclean : distclean-recursive distclean-local
88 dist: dist-recursive dist-local
89 check: all check-recursive
90 check-recursive: all
91 xcheck: all xcheck-recursive
92 xperf: all xperf-recursive
93 check-exhaustive: all check-exhaustive-recursive
94
95 pcheck: all tests
96 @$(MAKE) -C test pcheck
97
98 check-exhaustive-local: check-local
99
100 xcheck-recursive: all xcheck-local
101 @$(MAKE) -C test xcheck
102
103 xperf-recursive: all tests
104 @$(MAKE) -C test/perf xperf
105
106 $(top_builddir)/config/icuinfo.xml: all
107 @$(MAKE) -C tools/icuinfo check
108
109 ifeq ($(DOXYGEN),)
110 doc doc-searchengine:
111 @echo you need Doxygen to generate documentation. Doxygen can be found on the Web
112 @echo at http://www.doxygen.org/
113 else
114 doc: doc/html/index.html
115
116 doc-searchengine: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h)
117 sed < Doxyfile -e 's%[^#]*SEARCHENGINE.*%SEARCHENGINE=YES%' | $(DOXYGEN) -
118 @echo adding links from non-namespaced class files
119 find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
120 @echo Docs created - WARNING, probably contains non-GPL .js files
121
122 doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h)
123 $(DOXYGEN)
124 @echo adding links from non-namespaced class files
125 find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
126
127 Doxyfile: $(srcdir)/Doxyfile.in
128 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
129
130 $(DOCZIP): doc
131 -$(RMV) $(DOCZIP)
132 ( cd doc/html ; zip -r ../../$(DOCZIP) * )
133 endif
134
135 LOCAL_SUBDIRS = $(SUBDIRS)
136 CLEAN_FIRST_SUBDIRS = $(TOOLS)
137
138 $(LIBDIR) $(BINDIR):
139 -$(MKINSTALLDIRS) $@
140
141 ## Recursive targets
142 all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR)
143 @dot_seen=no; \
144 target=`echo $@ | sed s/-recursive//`; \
145 list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
146 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
147 if test "$$subdir" = "."; then \
148 dot_seen=yes; \
149 local_target="$$target-local"; \
150 else \
151 local_target="$$target"; \
152 fi; \
153 (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \
154 done; \
155 if test "$$dot_seen" = "no"; then \
156 $(MAKE) "$$target-local" || exit; \
157 fi
158
159 clean-recursive-with-twist:
160 $(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'
161
162 all-local: $(srcdir)/configure $(LOCAL_BUILT_FILES) $(INSTALLED_BUILT_FILES)
163 ifndef VERBOSE
164 @echo "Note: rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all compiler parameters."
165 endif
166 install-local: install-icu install-manx
167
168 # always installs. Used by layoutex.
169 install-pkgconfig: $(ALL_PKGCONFIG_FILES)
170 @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
171 $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
172
173 install-icu: $(INSTALLED_BUILT_FILES)
174 @$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
175 @$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
176 @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
177 @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
178 $(INSTALL_DATA) @platform_make_fragment@ $(DESTDIR)$(pkgdatadir)/config/@platform_make_fragment_name@
179 $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs
180 $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
181 @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
182 $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
183 $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
184 $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
185 $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
186 $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
187 # @echo icuinfo.xml is built after make check.
188 # -$(INSTALL_DATA) $(top_builddir)/config/icuinfo.xml $(DESTDIR)$(pkglibdir)/icuinfo.xml
189 cd $(DESTDIR)$(pkglibdir)/..; \
190 $(RM) current && ln -s $(VERSION) current; \
191 $(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc; \
192 $(RM) pkgdata.inc && ln -s current/pkgdata.inc pkgdata.inc
193
194 ifeq ($(DOXYGEN),)
195 install-doc:
196 else
197 install-doc: doc
198 $(RM) -r $(DESTDIR)$(docdir)/$(docsubdir)
199 $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(docsubdir)
200 $(INSTALL_DATA) $(docfiles) $(DESTDIR)$(docdir)/$(docsubdir)
201
202 endif
203
204 $(DESTDIR)$(pkglibdir)/%: $(top_srcdir)/../data/%
205 $(INSTALL_DATA) $< $@
206
207 # Build the tests, but don't run them.
208 tests: all
209 $(MAKE) -C $(top_builddir)/test
210
211 clean-local:
212 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
213 -$(RMV) "test-*.xml"
214 -$(RMV) "perf-*.xml"
215 -$(RMV) $(ALL_PKGCONFIG_FILES) $(top_builddir)/config/icuinfo.xml
216 $(RMV) Doxyfile doc $(DOCZIP)
217
218 distclean-local: clean-local
219 $(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc $(top_builddir)/config/icu-config $(top_builddir)/config/icu.pc $(ALL_PKGCONFIG_FILES)
220 $(RMV) config.cache config.log config.status $(top_builddir)/config/icucross.mk $(top_builddir)/config/icucross.inc autom4te.cache uconfig.h.prepend
221 $(RMV) Makefile config/Makefile icudefs.mk $(LIBDIR) $(BINDIR)
222 -$(RMV) dist
223
224 check-local: xcheck-local
225 -$(RMV) test-local.xml
226
227 xcheck-local: $(top_builddir)/config/icu-config $(top_builddir)/config/Makefile.inc $(top_builddir)/config/pkgdata.inc
228 @echo verifying that icu-config --selfcheck can operate
229 @test "passed" = "$(shell $(top_builddir)/config/icu-config --selfcheck 2>&1)" || (echo "FAIL: icu-config could not run properly." ; exit 1)
230 @echo verifying that $(MAKE) -f Makefile.inc selfcheck can operate
231 @test "passed" = "$(shell $(MAKE) --no-print-directory -f $(top_builddir)/config/Makefile.inc SELFCHECK=1 selfcheck)" || (echo "FAIL: Makefile.inc could not run properly." ; exit 1 )
232 @echo "PASS: config selfcheck OK"
233
234 #$(srcdir)/configure : $(srcdir)/configure.ac $(top_srcdir)/aclocal.m4
235 # cd $(srcdir) && aclocal && $(AUTOCONF)
236
237 icudefs.mk: $(srcdir)/icudefs.mk.in $(top_builddir)/config.status
238 cd $(top_builddir) \
239 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
240
241 config/icucross.mk: $(top_builddir)/icudefs.mk $(top_builddir)/Makefile
242 @echo rebuilding $@
243 @(echo "CROSS_ICU_VERSION=$(VERSION)" ;\
244 echo "TOOLEXEEXT=$(EXEEXT)" \
245 ) > $@
246 @(echo 'TOOLBINDIR=$$(cross_buildroot)/bin' ;\
247 echo 'TOOLLIBDIR=$$(cross_buildroot)/lib' ;\
248 echo "INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(TOOLLIBDIR):$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$$$'"$(LDLIBRARYPATH_ENVVAR)" ;\
249 echo "PKGDATA_INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$(TOOLLIBDIR):$$$$'"$(LDLIBRARYPATH_ENVVAR) " ;\
250 echo ) >> $@
251
252 config/icucross.inc: $(top_builddir)/icudefs.mk $(top_builddir)/Makefile @platform_make_fragment@
253 @echo rebuilding $@
254 @(grep '^CURR_FULL_DIR' $(top_builddir)/icudefs.mk ; \
255 grep '^CURR_FULL_DIR' @platform_make_fragment@ || echo ""; \
256 ) > $@
257
258 config/icu.pc: $(srcdir)/config/icu.pc.in
259 cd $(top_builddir) \
260 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
261
262 config/icu-uc.pc: config/icu.pc Makefile icudefs.mk
263 @cat config/icu.pc > $@
264 @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@
265 @echo "Name: $(PACKAGE)-uc" >> $@
266 @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" >> $@
267 @echo "Libs.private:" '$${baselibs}' >> $@
268 @echo $@ updated.
269
270 config/icu-i18n.pc: config/icu.pc Makefile icudefs.mk
271 @cat config/icu.pc > $@
272 @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Internationalization library" >> $@
273 @echo "Name: $(PACKAGE)-i18n" >> $@
274 @echo "Requires: icu-uc" >> $@
275 @echo "Libs:" "${ICULIBS_I18N}" >> $@
276 @echo $@ updated.
277
278 config/icu-io.pc: config/icu.pc Makefile icudefs.mk
279 @cat config/icu.pc > $@
280 @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Stream and I/O Library" >> $@
281 @echo "Name: $(PACKAGE)-io" >> $@
282 @echo "Requires: icu-i18n" >> $@
283 @echo "Libs:" "${ICULIBS_IO}" >> $@
284 @echo $@ updated.
285
286 config/icu-le.pc: config/icu.pc Makefile icudefs.mk
287 @cat config/icu.pc > $@
288 @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Layout library" >> $@
289 @echo "Name: $(PACKAGE)-le" >> $@
290 @echo "Requires: icu-uc" >> $@
291 @echo "Libs:" "${ICULIBS_LE}" >> $@
292 @echo $@ updated.
293
294 ICULEHB_LIBS=@ICULEHB_LIBS@
295 USING_HB=
296 ifneq ($(ICULEHB_LIBS),)
297 USING_HB=(Using HarfBuzz)
298 endif
299
300
301 config/icu-lx.pc: config/icu.pc Makefile icudefs.mk
302 @cat config/icu.pc > $@
303 @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library $(USING_HB)" >> $@
304 @echo "Name: $(PACKAGE)-lx" >> $@
305 ifneq ($(ICULEHB_LIBS),)
306 @echo "Requires: icu-le-hb icu-uc" >> $@
307 else
308 @echo "Requires: icu-le" >> $@
309 endif
310 @echo "Libs:" "${ICULIBS_LX}" >> $@
311 @echo $@ updated.
312
313
314 Makefile: $(srcdir)/Makefile.in icudefs.mk $(top_builddir)/config.status
315 cd $(top_builddir) \
316 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
317
318 $(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_builddir)/config.status
319 cd $(top_builddir) \
320 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
321
322 $(top_builddir)/config/pkgdata.inc: icudefs.mk $(top_builddir)/config/pkgdataMakefile
323 cd $(top_builddir)/config; \
324 $(MAKE) -f pkgdataMakefile
325
326 $(top_builddir)/config/pkgdataMakefile:
327 cd $(top_builddir) \
328 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
329
330 $(top_builddir)/config/icu-config: $(top_builddir)/Makefile $(top_srcdir)/config/icu-config-top $(top_srcdir)/config/icu-config-bottom $(top_builddir)/config/Makefile.inc @platform_make_fragment@ $(top_srcdir)/config/make2sh.sed
331 -$(RMV) $@
332 $(INSTALL_SCRIPT) $(top_srcdir)/config/icu-config-top $@
333 chmod u+w $@
334 @echo "# Following from @platform_make_fragment@" >> $@
335 LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
336 LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
337 cat $(top_srcdir)/config/icu-config-bottom >> $@
338 chmod u-w $@
339
340 config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
341 @echo
342 @echo
343 @echo "*** config.status has become stale ***"
344 @echo " 'configure' and/or 'uvernum.h' have changed, please"
345 @echo " do 'runConfigureICU' (or 'configure') again, as per"
346 @echo " the readme.html."
347 @echo
348 @echo
349 exit 1
350
351
352 install-manx: $(MANX_FILES)
353 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
354 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
355
356 config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
357 cd $(top_builddir) \
358 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
359
360 icu4j-data-install icu4j-data: all tests
361 @echo ICU4J_ROOT=$(ICU4J_ROOT)
362 @$(MAKE) -C test/testdata $@
363 @$(MAKE) -C data $@
364
365 # For updating Windows makefiles
366
367 WINDOWS_UPDATEFILES=$(srcdir)/data/makedata.mak $(shell find $(srcdir) -name '*.vcproj' -o -name '*.vcxproj')
368
369 WINDOWS_UPDATEFILES_SED=config/windows-update.sed
370
371 update-windows-makefiles: config.status
372 @echo Updating Windows Makefiles for ICU $(VERSION)
373 CONFIG_FILES=$(WINDOWS_UPDATEFILES_SED) CONFIG_HEADERS= $(SHELL) ./config.status
374 @for file in $(WINDOWS_UPDATEFILES); do \
375 echo "Updating $$file"; \
376 mv "$${file}" "$${file}.bak" && \
377 sed -f $(WINDOWS_UPDATEFILES_SED) < "$${file}.bak" > "$${file}" && \
378 rm "$${file}.bak"; \
379 done;
380 $(RMV) $(WINDOWS_UPDATEFILES_SED)
381 @echo Please check over the changes carefully before checking them in.
382
383 # For building a source distribution.
384 distcheck dist-local:
385 $(MAKE) -C . -f $(top_srcdir)/config/dist.mk srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" $@
386
387 ifeq ($(DESTDIR),)
388 releaseDist:
389 @echo "Please provide DESTDIR when calling the target releaseDist."
390 else
391 releaseDist: install
392 @echo -n "ICU Version: " > $(DESTDIR)/readme.txt
393 @echo `./config/icu-config --noverify --version` >> $(DESTDIR)/readme.txt
394 @echo -n "HOST: " >> $(DESTDIR)/readme.txt
395 @echo `./config/icu-config --noverify --host` >> $(DESTDIR)/readme.txt
396 @echo -n "CC Compiler: " >> $(DESTDIR)/readme.txt
397 @echo `./config/icu-config --noverify --cc` >> $(DESTDIR)/readme.txt
398 @echo -n "CXX Compiler: " >> $(DESTDIR)/readme.txt
399 @echo `./config/icu-config --noverify --cxx` >> $(DESTDIR)/readme.txt
400 endif
401
402 check-installed-icu: install
403 @echo "Testing ICU installed in $(prefix)"
404 $(INSTALLED_INVOKE) $(bindir)/icuinfo$(EXEEXT)
405 $(INSTALLED_INVOKE) $(bindir)/uconv$(EXEEXT) -V
406 $(INSTALLED_INVOKE) $(bindir)/genrb$(EXEEXT) -V
407 $(INSTALLED_INVOKE) $(bindir)/gencnval$(EXEEXT) -h
408 @echo INSTALLED ICU IN "$(prefix)" OK!