1 #******************************************************************************
3 # Copyright (C) 1998-2003, 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
22 ## Build directory information
27 ## Platform-specific setup
28 include @platform_make_fragment@
30 ## Optional directory setup
31 @EXTRAS_TRUE@EXTRA = extra
33 @LAYOUT_TRUE@LAYOUT = layout layoutex
34 @LAYOUT_FALSE@LAYOUT =
35 @TESTS_TRUE@TEST = test
37 @SAMPLES_TRUE@SAMPLE = samples
38 @SAMPLES_FALSE@SAMPLE =
42 ## Files to remove for 'make clean'
43 CLEANFILES = *~ README
45 ## Files built (autoconfed) and installed
46 INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config @platform_make_fragment@ README $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%)
48 ## Files built (autoconfed) but not installed
49 LOCAL_BUILT_FILES = icudefs.mk
52 SUBDIRS = stubdata common i18n $(LAYOUT) tools data $(EXTRA) $(TEST) $(SAMPLE)
56 MANX_FILES = config/icu-config.$(SECTION)
58 ALL_MAN_FILES = $(MANX_FILES)
60 ## Extra files to install [nothing at present]
63 ## List of phony targets
64 .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
65 install-recursive clean clean-local clean-recursive distclean \
66 distclean-local distclean-recursive doc dist dist-local dist-recursive \
67 check check-local check-recursive clean-recursive-with-twist install-icu \
73 ## List of standard targets
74 all: all-local all-recursive
75 install: install-recursive install-local
76 clean: clean-recursive-with-twist clean-local
77 distclean : distclean-recursive distclean-local
78 dist: dist-recursive dist-local
79 check: all check-recursive check-local
83 @echo you need Doxygen to generate documentation. Doxygen can be found on the Web
84 @echo at http://www.doxygen.org/
86 doc: doc/html/index.html
88 doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h)
91 Doxyfile: $(srcdir)/Doxyfile.in
92 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
95 LOCAL_SUBDIRS = $(SUBDIRS)
96 CLEAN_FIRST_SUBDIRS = tools
99 all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive:
101 target=`echo $@ | sed s/-recursive//`; \
102 list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
103 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
104 if test "$$subdir" = "."; then \
106 local_target="$$target-local"; \
108 local_target="$$target"; \
110 (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \
112 if test "$$dot_seen" = "no"; then \
113 $(MAKE) "$$target-local" || exit; \
116 clean-recursive-with-twist:
117 $(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'
119 all-local: $(srcdir)/configure $(LOCAL_BUILT_FILES) $(INSTALLED_BUILT_FILES)
121 install-local: install-icu install-manx
123 install-icu: $(INSTALLED_BUILT_FILES)
124 @$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
125 @$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
126 @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
127 @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
128 $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
129 cd $(DESTDIR)$(pkglibdir)/..; \
130 $(RM) current && ln -s $(VERSION) current; \
131 $(RM) Makefile.inc && ln -s current/Makefile.inc .
132 $(INSTALL_DATA) @platform_make_fragment@ $(DESTDIR)$(pkgdatadir)/config/@platform_make_fragment_name@
133 $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs
134 $(INSTALL_DATA) README $(DESTDIR)$(pkgdatadir)/README
135 $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
141 $(RM) -r $(DESTDIR)$(docdir)/$(docsubdir)
142 $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(docsubdir)
143 $(INSTALL_DATA) doc/html/* $(DESTDIR)$(docdir)/$(docsubdir)
146 $(DESTDIR)$(pkglibdir)/%: $(top_srcdir)/../data/%
147 $(INSTALL_DATA) $< $@
152 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
155 distclean-local: clean-local
156 $(RMV) Makefile config/Makefile icudefs.mk
157 $(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config
158 $(RMV) config.cache config.log config.status
162 #$(srcdir)/configure : $(srcdir)/configure.in $(top_srcdir)/aclocal.m4
163 # cd $(srcdir) && $(AUTOCONF)
165 icudefs.mk: $(srcdir)/icudefs.mk.in $(top_builddir)/config.status
167 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
169 README: $(srcdir)/README.in $(top_builddir)/config.status
171 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
173 Makefile: $(srcdir)/Makefile.in icudefs.mk $(top_builddir)/config.status
175 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
177 $(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_builddir)/config.status
179 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
181 $(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
183 $(INSTALL_DATA) $(top_srcdir)/config/icu-config-top $@
184 @echo "# Following from @platform_make_fragment@" >> $@
185 sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
186 sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
187 cat $(top_srcdir)/config/icu-config-bottom >> $@
188 echo "# Rebuilt on "`date` >> $@
190 config.status: $(srcdir)/configure $(srcdir)/common/unicode/uversion.h
193 @echo "*** config.status has become stale ***"
194 @echo " 'configure' and/or 'uversion.h' have changed, please"
195 @echo " do 'runConfigureICU' (or 'configure') again, as per"
196 @echo " the readme.html."
202 install-manx: $(MANX_FILES)
203 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
204 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
206 config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
208 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status