1 #******************************************************************************
3 # Copyright (C) 1998-2013, International Business Machines
4 # Corporation and others. All Rights Reserved.
6 #******************************************************************************
7 ## Top-level Makefile.in for ICU
11 top_srcdir
= @top_srcdir@
15 include $(top_builddir
)/icudefs.mk
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
)/*
26 ## Build directory information
29 #AUTOCONF = @AUTOCONF@
31 ## Optional directory setup
32 @LAYOUT_TRUE@LAYOUT
= layout layoutex
33 @ICUIO_TRUE@ICUIO
= io
34 @EXTRAS_TRUE@EXTRA
= extra
35 @TESTS_TRUE@TEST
= test
36 @SAMPLES_TRUE@SAMPLE
= samples
37 @TOOLS_TRUE@TOOLS
= tools
39 ## pkgconfig setup. Always have uc and i18n. Others are optional.
40 ALL_PKGCONFIG_SUFFIX
=uc i18n
41 @LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX
+= le lx
42 @ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX
+= io
47 ## Files to remove for 'make clean'
50 ALL_PKGCONFIG_FILES
=$(ALL_PKGCONFIG_SUFFIX
:%=$(top_builddir
)/config
/icu-
%.
pc)
52 ## Files built (autoconfed) and installed
53 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
)
55 ## Files built (autoconfed) but not installed
56 LOCAL_BUILT_FILES
= icudefs.mk config
/icucross.mk config
/icucross.inc
59 SUBDIRS
= stubdata common i18n
$(LAYOUT
) $(ICUIO
) $(TOOLS
) data
$(EXTRA
) $(SAMPLE
) $(TEST
)
63 MANX_FILES
= config
/icu-config.
$(SECTION
)
65 ALL_MAN_FILES
= $(MANX_FILES
)
67 ## Extra files to install [nothing at present]
70 ## List of phony targets
71 .PHONY
: all all-local all-recursive
install install-local install-udata install-udata-files install-udata-dlls \
72 install-recursive
clean clean-local clean-recursive
distclean \
73 distclean-local distclean-recursive doc
dist dist-local dist-recursive \
74 check check-local check-recursive clean-recursive-with-twist install-icu \
75 doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
76 check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
81 ## List of standard targets
82 all: all-local all-recursive
83 install: install-recursive install-local
84 clean: clean-recursive-with-twist clean-local
85 distclean : distclean-recursive distclean-local
86 dist: dist-recursive dist-local
87 check: all check-recursive
89 xcheck
: all xcheck-recursive
90 xperf
: all xperf-recursive
91 check-exhaustive
: all check-exhaustive-recursive
94 @
$(MAKE
) -C
test pcheck
96 check-exhaustive-local
: check-local
98 xcheck-recursive
: all xcheck-local
99 @
$(MAKE
) -C
test xcheck
101 xperf-recursive
: all tests
102 @
$(MAKE
) -C
test/perf xperf
104 $(top_builddir
)/config
/icuinfo.xml
: all
105 @
$(MAKE
) -C tools
/icuinfo
check
108 doc doc-searchengine
:
109 @echo you need Doxygen to generate documentation. Doxygen can be found on the Web
110 @echo at http
://www.doxygen.org
/
112 doc
: doc
/html
/index.html
114 doc-searchengine
: Doxyfile
$(wildcard .
/common
/unicode
/platform.h
$(srcdir)/common
/unicode
/*.h
$(srcdir)/i18n
/unicode
/*.h
$(srcdir)/layout
/unicode
/*.h
$(srcdir)/io
/unicode
/*.h
)
115 sed
< Doxyfile
-e
's%[^#]*SEARCHENGINE.*%SEARCHENGINE=YES%' |
$(DOXYGEN
) -
116 @echo adding links from non-namespaced class files
117 find doc
/html
-name
'classicu_1_1*' -print | sed
-e
's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
118 @echo Docs created
- WARNING
, probably contains non-GPL .js files
120 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
)
122 @echo adding links from non-namespaced class files
123 find doc
/html
-name
'classicu_1_1*' -print | sed
-e
's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
125 Doxyfile
: $(srcdir)/Doxyfile.in
126 CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
130 ( cd doc
/html
; zip
-r ..
/..
/$(DOCZIP
) * )
133 LOCAL_SUBDIRS
= $(SUBDIRS
)
134 CLEAN_FIRST_SUBDIRS
= $(TOOLS
)
140 all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive
: $(LIBDIR
) $(BINDIR
)
142 target
=`echo $@ | sed s/-recursive//`; \
143 list
='$(LOCAL_SUBDIRS)'; for subdir in
$$list; do \
144 echo
"$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
145 if
test "$$subdir" = "."; then \
147 local_target
="$$target-local"; \
149 local_target
="$$target"; \
151 (cd
$$subdir && $(MAKE
) RECURSIVE
=YES
$$local_target) || exit
; \
153 if
test "$$dot_seen" = "no"; then \
154 $(MAKE
) "$$target-local" || exit
; \
157 clean-recursive-with-twist
:
158 $(MAKE
) clean-recursive LOCAL_SUBDIRS
='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'
160 all-local
: $(srcdir)/configure
$(LOCAL_BUILT_FILES
) $(INSTALLED_BUILT_FILES
)
162 @echo
"Note: rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all compiler parameters."
164 install-local
: install-icu install-manx
166 install-icu
: $(INSTALLED_BUILT_FILES
)
167 @
$(MKINSTALLDIRS
) $(DESTDIR
)$(pkgdatadir
)/config
168 @
$(MKINSTALLDIRS
) $(DESTDIR
)$(pkglibdir
)
169 @
$(MKINSTALLDIRS
) $(DESTDIR
)$(bindir)
170 @
$(MKINSTALLDIRS
) $(DESTDIR
)$(sbindir
)
171 $(INSTALL_DATA
) @platform_make_fragment@
$(DESTDIR
)$(pkgdatadir
)/config
/@platform_make_fragment_name@
172 $(INSTALL_SCRIPT
) $(top_srcdir
)/mkinstalldirs
$(DESTDIR
)$(pkgdatadir
)/mkinstalldirs
173 $(INSTALL_SCRIPT
) $(top_srcdir
)/install-sh
$(DESTDIR
)$(pkgdatadir
)/install-sh
174 @
$(MKINSTALLDIRS
) $(DESTDIR
)$(libdir)/pkgconfig
175 $(INSTALL_DATA
) $(ALL_PKGCONFIG_FILES
) $(DESTDIR
)$(libdir)/pkgconfig
/
176 $(INSTALL_DATA
) $(top_srcdir
)/..
/license.html
$(DESTDIR
)$(pkgdatadir
)/license.html
177 $(INSTALL_SCRIPT
) $(top_builddir
)/config
/icu-config
$(DESTDIR
)$(bindir)/icu-config
178 $(INSTALL_DATA
) $(top_builddir
)/config
/Makefile.inc
$(DESTDIR
)$(pkglibdir
)/Makefile.inc
179 $(INSTALL_DATA
) $(top_builddir
)/config
/pkgdata.inc
$(DESTDIR
)$(pkglibdir
)/pkgdata.inc
180 # @echo icuinfo.xml is built after make check.
181 # -$(INSTALL_DATA) $(top_builddir)/config/icuinfo.xml $(DESTDIR)$(pkglibdir)/icuinfo.xml
182 cd
$(DESTDIR
)$(pkglibdir
)/..
; \
183 $(RM
) current
&& ln
-s
$(VERSION
) current
; \
184 $(RM
) Makefile.inc
&& ln
-s current
/Makefile.inc Makefile.inc
; \
185 $(RM
) pkgdata.inc
&& ln
-s current
/pkgdata.inc pkgdata.inc
191 $(RM
) -r
$(DESTDIR
)$(docdir
)/$(docsubdir
)
192 $(MKINSTALLDIRS
) $(DESTDIR
)$(docdir
)/$(docsubdir
)
193 $(INSTALL_DATA
) $(docfiles
) $(DESTDIR
)$(docdir
)/$(docsubdir
)
197 $(DESTDIR
)$(pkglibdir
)/%: $(top_srcdir
)/..
/data
/%
198 $(INSTALL_DATA
) $< $@
200 # Build the tests, but don't run them.
202 $(MAKE
) -C
$(top_builddir
)/test
205 test -z
"$(CLEANFILES)" ||
$(RMV
) $(CLEANFILES
)
208 -$(RMV
) $(ALL_PKGCONFIG_FILES
) $(top_builddir
)/config
/icuinfo.xml
209 $(RMV
) Doxyfile doc
$(DOCZIP
)
211 distclean-local
: clean-local
212 $(RMV
) $(top_builddir
)/config
/Makefile.inc
$(top_builddir
)/config
/pkgdata.inc
$(top_builddir
)/config
/icu-config
$(top_builddir
)/config
/icu.
pc $(ALL_PKGCONFIG_FILES
)
213 $(RMV
) config.cache config.log config.status
$(top_builddir
)/config
/icucross.mk
$(top_builddir
)/config
/icucross.inc autom4te.cache uconfig.h.prepend
214 $(RMV
) Makefile config
/Makefile icudefs.mk
$(LIBDIR
) $(BINDIR
)
217 check-local
: xcheck-local
218 -$(RMV
) test-local.xml
220 xcheck-local
: $(top_builddir
)/config
/icu-config
$(top_builddir
)/config
/Makefile.inc
$(top_builddir
)/config
/pkgdata.inc
221 @echo verifying that icu-config
--selfcheck can operate
222 @
test "passed" = "$(shell $(top_builddir)/config/icu-config --selfcheck 2>&1)" ||
(echo
"FAIL: icu-config could not run properly." ; exit
1)
223 @echo verifying that
$(MAKE
) -f Makefile.inc selfcheck can operate
224 @
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 )
225 @echo
"PASS: config selfcheck OK"
227 #$(srcdir)/configure : $(srcdir)/configure.ac $(top_srcdir)/aclocal.m4
228 # cd $(srcdir) && aclocal && $(AUTOCONF)
230 icudefs.mk
: $(srcdir)/icudefs.mk.in
$(top_builddir
)/config.status
232 && CONFIG_FILES
=$(subdir
)/$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
234 config
/icucross.mk
: $(top_builddir
)/icudefs.mk
$(top_builddir
)/Makefile
236 @
(echo
"CROSS_ICU_VERSION=$(VERSION)" ;\
237 echo
"TOOLEXEEXT=$(EXEEXT)" \
239 @
(echo
'TOOLBINDIR=$$(cross_buildroot)/bin' ;\
240 echo
'TOOLLIBDIR=$$(cross_buildroot)/lib' ;\
241 echo
"INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(TOOLLIBDIR):$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$$$'"$(LDLIBRARYPATH_ENVVAR)" ;\
242 echo
"PKGDATA_INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$(TOOLLIBDIR):$$$$'"$(LDLIBRARYPATH_ENVVAR) " ;\
245 config
/icucross.inc
: $(top_builddir
)/icudefs.mk
$(top_builddir
)/Makefile @platform_make_fragment@
247 @
(grep
'^CURR_FULL_DIR' $(top_builddir
)/icudefs.mk
; \
248 grep
'^CURR_FULL_DIR' @platform_make_fragment@ || echo
""; \
251 config
/icu.
pc: $(srcdir)/config
/icu.
pc.in
253 && CONFIG_FILES
=$(subdir
)/$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
255 config
/icu-uc.
pc: config
/icu.
pc Makefile icudefs.mk
256 @cat config
/icu.
pc > $@
257 @echo
"Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@
258 @echo
"Name: $(PACKAGE)-uc" >> $@
259 @echo
"Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" >> $@
260 @echo
"Libs.private:" '$${baselibs}' >> $@
263 config
/icu-i18n.
pc: config
/icu.
pc Makefile icudefs.mk
264 @cat config
/icu.
pc > $@
265 @echo
"Description: $(PACKAGE_ICU_DESCRIPTION): Internationalization library" >> $@
266 @echo
"Name: $(PACKAGE)-i18n" >> $@
267 @echo
"Requires: icu-uc" >> $@
268 @echo
"Libs:" "${ICULIBS_I18N}" >> $@
271 config
/icu-io.
pc: config
/icu.
pc Makefile icudefs.mk
272 @cat config
/icu.
pc > $@
273 @echo
"Description: $(PACKAGE_ICU_DESCRIPTION): Stream and I/O Library" >> $@
274 @echo
"Name: $(PACKAGE)-io" >> $@
275 @echo
"Requires: icu-i18n" >> $@
276 @echo
"Libs:" "${ICULIBS_IO}" >> $@
279 config
/icu-le.
pc: config
/icu.
pc Makefile icudefs.mk
280 @cat config
/icu.
pc > $@
281 @echo
"Description: $(PACKAGE_ICU_DESCRIPTION): Layout library" >> $@
282 @echo
"Name: $(PACKAGE)-le" >> $@
283 @echo
"Requires: icu-uc" >> $@
284 @echo
"Libs:" "${ICULIBS_LE}" >> $@
287 config
/icu-lx.
pc: config
/icu.
pc Makefile icudefs.mk
288 @cat config
/icu.
pc > $@
289 @echo
"Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library" >> $@
290 @echo
"Name: $(PACKAGE)-lx" >> $@
291 @echo
"Requires: icu-le" >> $@
292 @echo
"Libs:" "${ICULIBS_LX}" >> $@
296 Makefile
: $(srcdir)/Makefile.in icudefs.mk
$(top_builddir
)/config.status
298 && CONFIG_FILES
=$(subdir
)/$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
300 $(top_builddir
)/config
/Makefile.inc
: $(srcdir)/config
/Makefile.inc.in
$(top_builddir
)/config.status
302 && CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
304 $(top_builddir
)/config
/pkgdata.inc
: icudefs.mk
$(top_builddir
)/config
/pkgdataMakefile
305 cd
$(top_builddir
)/config
; \
306 $(MAKE
) -f pkgdataMakefile
308 $(top_builddir
)/config
/pkgdataMakefile
:
310 && CONFIG_FILES
=$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
312 $(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
314 $(INSTALL_SCRIPT
) $(top_srcdir
)/config
/icu-config-top
$@
316 @echo
"# Following from @platform_make_fragment@" >> $@
317 LC_ALL
=C sed
-f
$(top_srcdir
)/config
/make2sh.sed
< $(top_builddir
)/config
/Makefile.inc | grep
-v
'#M#' | uniq
>> $@
318 LC_ALL
=C sed
-f
$(top_srcdir
)/config
/make2sh.sed
< @platform_make_fragment@ | grep
-v
'#M#' | uniq
>> $@
319 cat
$(top_srcdir
)/config
/icu-config-bottom
>> $@
320 echo
"# Rebuilt on "`date` >> $@
323 config.status
: $(srcdir)/configure
$(srcdir)/common
/unicode
/uvernum.h
326 @echo
"*** config.status has become stale ***"
327 @echo
" 'configure' and/or 'uvernum.h' have changed, please"
328 @echo
" do 'runConfigureICU' (or 'configure') again, as per"
329 @echo
" the readme.html."
335 install-manx
: $(MANX_FILES
)
336 $(MKINSTALLDIRS
) $(DESTDIR
)$(mandir)/man
$(SECTION
)
337 $(INSTALL_DATA
) $?
$(DESTDIR
)$(mandir)/man
$(SECTION
)
339 config
/%.
$(SECTION
): $(srcdir)/config
/%.
$(SECTION
).in
341 && CONFIG_FILES
=$(subdir
)/$@ CONFIG_HEADERS
= $(SHELL
) .
/config.status
343 icu4j-data-install icu4j-data
: all tests
344 @echo ICU4J_ROOT
=$(ICU4J_ROOT
)
345 @
$(MAKE
) -C
test/testdata
$@
348 # For updating Windows makefiles
350 WINDOWS_UPDATEFILES
=$(srcdir)/data
/makedata.mak
$(shell find
$(srcdir) -name
'*.vcproj' -o
-name
'*.vcxproj')
352 WINDOWS_UPDATEFILES_SED
=config
/windows-update.sed
354 update-windows-makefiles
: config.status
355 @echo Updating Windows Makefiles for ICU
$(VERSION
)
356 CONFIG_FILES
=$(WINDOWS_UPDATEFILES_SED
) CONFIG_HEADERS
= $(SHELL
) .
/config.status
357 @for file in
$(WINDOWS_UPDATEFILES
); do \
358 echo
"Updating $$file"; \
359 mv
"$${file}" "$${file}.bak" && \
360 sed
-f
$(WINDOWS_UPDATEFILES_SED
) < "$${file}.bak" > "$${file}" && \
363 $(RMV
) $(WINDOWS_UPDATEFILES_SED
)
364 @echo Please
check over the changes carefully before checking them in.
366 # For building a source distribution.
367 distcheck dist-local
:
368 $(MAKE
) -C .
-f
$(top_srcdir
)/config
/dist.mk
srcdir="$(srcdir)" top_srcdir
="$(top_srcdir)" $@
372 @echo
"Please provide DESTDIR when calling the target releaseDist."
375 @echo
-n
"ICU Version: " > $(DESTDIR
)/readme.txt
376 @echo
`./config/icu-config --noverify --version` >> $(DESTDIR
)/readme.txt
377 @echo
-n
"HOST: " >> $(DESTDIR
)/readme.txt
378 @echo
`./config/icu-config --noverify --host` >> $(DESTDIR
)/readme.txt
379 @echo
-n
"CC Compiler: " >> $(DESTDIR
)/readme.txt
380 @echo
`./config/icu-config --noverify --cc` >> $(DESTDIR
)/readme.txt
381 @echo
-n
"CXX Compiler: " >> $(DESTDIR
)/readme.txt
382 @echo
`./config/icu-config --noverify --cxx` >> $(DESTDIR
)/readme.txt
385 check-installed-icu
: install
386 @echo
"Testing ICU installed in $(prefix)"
387 $(INSTALLED_INVOKE
) $(bindir)/icuinfo
$(EXEEXT
)
388 $(INSTALLED_INVOKE
) $(bindir)/uconv
$(EXEEXT
) -V
389 $(INSTALLED_INVOKE
) $(bindir)/genrb
$(EXEEXT
) -V
390 $(INSTALLED_INVOKE
) $(bindir)/gencnval
$(EXEEXT
) -h
391 @echo INSTALLED ICU IN
"$(prefix)" OK
!