+# Copyright (C) 2016 and later: Unicode, Inc. and others.
+# License & terms of use: http://www.unicode.org/copyright.html
#******************************************************************************
#
-# Copyright (C) 1998-2013, International Business Machines
+# Copyright (C) 1998-2016, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
#AUTOCONF = @AUTOCONF@
## Optional directory setup
-@LAYOUT_TRUE@LAYOUT = layout layoutex
+@LAYOUTEX_TRUE@LAYOUTEX = layoutex
@ICUIO_TRUE@ICUIO = io
@EXTRAS_TRUE@EXTRA = extra
-@TESTS_TRUE@TEST = test
+# need tools for tests
+@TOOLS_TRUE@@TESTS_TRUE@TEST = test
@SAMPLES_TRUE@SAMPLE = samples
+@TOOLS_TRUE@TOOLS = tools
+@TOOLS_TRUE@DATASUBDIR = data
## pkgconfig setup. Always have uc and i18n. Others are optional.
ALL_PKGCONFIG_SUFFIX=uc i18n
-@LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX+= le lx
+@LAYOUTEX_TRUE@ALL_PKGCONFIG_SUFFIX+= lx
@ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX+= io
DOXYGEN = @DOXYGEN@
DOCZIP = icu-docs.zip
+INSTALL_ICU_CONFIG = @INSTALL_ICU_CONFIG@
+
## Files to remove for 'make clean'
CLEANFILES = *~
LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc
DOCDIRS = common i18n
-SUBDIRS = stubdata common i18n $(LAYOUT) tools data $(ICUIO) $(EXTRA) $(SAMPLE) $(TEST)
+SUBDIRS = stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) $(DATASUBDIR) $(EXTRA) $(SAMPLE) $(TEST)
SECTION = 1
+ifeq ($(INSTALL_ICU_CONFIG),true)
MANX_FILES = config/icu-config.$(SECTION)
+endif
ALL_MAN_FILES = $(MANX_FILES)
install: install-recursive install-local
clean: clean-recursive-with-twist clean-local
distclean : distclean-recursive distclean-local
-dist: dist-recursive dist-local
+dist: dist-recursive
check: all check-recursive
check-recursive: all
xcheck: all xcheck-recursive
xperf: all xperf-recursive
check-exhaustive: all check-exhaustive-recursive
+pcheck: all tests
+ @$(MAKE) -C test pcheck
+
check-exhaustive-local: check-local
xcheck-recursive: all xcheck-local
else
doc: doc/html/index.html
-doc-searchengine: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h)
+doc-searchengine: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/io/unicode/*.h)
sed < Doxyfile -e 's%[^#]*SEARCHENGINE.*%SEARCHENGINE=YES%' | $(DOXYGEN) -
@echo adding links from non-namespaced class files
find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
@echo Docs created - WARNING, probably contains non-GPL .js files
-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)
+doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/io/unicode/*.h)
$(DOXYGEN)
@echo adding links from non-namespaced class files
find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
endif
LOCAL_SUBDIRS = $(SUBDIRS)
-CLEAN_FIRST_SUBDIRS = tools
+CLEAN_FIRST_SUBDIRS = $(TOOLS)
$(LIBDIR) $(BINDIR):
-$(MKINSTALLDIRS) $@
## Recursive targets
all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR)
+ifneq ($(NEED_ESCAPING),)
+ @echo "building tools/escapesrc (Needed for this platform with NEED_ESCAPING)"
+ @(cd tools/escapesrc && $(MAKE) RECURSIVE=YES $$local_target) || exit
+endif
@dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
endif
install-local: install-icu install-manx
+# always installs. Used by layoutex.
+install-pkgconfig: $(ALL_PKGCONFIG_FILES)
+ @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
+
install-icu: $(INSTALLED_BUILT_FILES)
@$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
@$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
- $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html
+ $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
+ifeq ($(INSTALL_ICU_CONFIG),true)
$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
+endif
$(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
$(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
# @echo icuinfo.xml is built after make check.
# -$(INSTALL_DATA) $(top_builddir)/config/icuinfo.xml $(DESTDIR)$(pkglibdir)/icuinfo.xml
cd $(DESTDIR)$(pkglibdir)/..; \
- $(RM) current && ln -s $(VERSION) current; \
+ $(RMV) current && ln -s $(VERSION) current; \
$(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc; \
$(RM) pkgdata.inc && ln -s current/pkgdata.inc pkgdata.inc
@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 )
@echo "PASS: config selfcheck OK"
-#$(srcdir)/configure : $(srcdir)/configure.in $(top_srcdir)/aclocal.m4
-# cd $(srcdir) && $(AUTOCONF)
+#$(srcdir)/configure : $(srcdir)/configure.ac $(top_srcdir)/aclocal.m4
+# cd $(srcdir) && aclocal && $(AUTOCONF)
icudefs.mk: $(srcdir)/icudefs.mk.in $(top_builddir)/config.status
cd $(top_builddir) \
@echo "Libs:" "${ICULIBS_IO}" >> $@
@echo $@ updated.
-config/icu-le.pc: config/icu.pc Makefile icudefs.mk
- @cat config/icu.pc > $@
- @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Layout library" >> $@
- @echo "Name: $(PACKAGE)-le" >> $@
- @echo "Requires: icu-uc" >> $@
- @echo "Libs:" "${ICULIBS_LE}" >> $@
- @echo $@ updated.
+ICULEHB_LIBS=@ICULEHB_LIBS@
+USING_HB=
+ifneq ($(ICULEHB_LIBS),)
+USING_HB=(Using HarfBuzz)
+endif
+
config/icu-lx.pc: config/icu.pc Makefile icudefs.mk
@cat config/icu.pc > $@
- @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library" >> $@
+ @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library $(USING_HB)" >> $@
@echo "Name: $(PACKAGE)-lx" >> $@
+ifneq ($(ICULEHB_LIBS),)
+ @echo "Requires: icu-le-hb icu-uc" >> $@
+else
@echo "Requires: icu-le" >> $@
+endif
@echo "Libs:" "${ICULIBS_LX}" >> $@
@echo $@ updated.
-$(RMV) $@
$(INSTALL_SCRIPT) $(top_srcdir)/config/icu-config-top $@
chmod u+w $@
+ @echo "# Following from icu/icu4c/source/config/Makefile.inc" >> $@
+ LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
@echo "# Following from @platform_make_fragment@" >> $@
- LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
- LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
+ LC_ALL=C $(SED) -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
cat $(top_srcdir)/config/icu-config-bottom >> $@
- echo "# Rebuilt on "`date` >> $@
chmod u-w $@
config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
install-manx: $(MANX_FILES)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
+ifneq ($(MANX_FILES),)
$(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
+endif
config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
cd $(top_builddir) \