]> git.saurik.com Git - apple/icu.git/blame - icuSources/Makefile.in
ICU-400.39.tar.gz
[apple/icu.git] / icuSources / Makefile.in
CommitLineData
b75a7d8f
A
1#******************************************************************************
2#
46f4442e 3# Copyright (C) 1998-2008, International Business Machines
b75a7d8f
A
4# Corporation and others. All Rights Reserved.
5#
6#******************************************************************************
7## Top-level Makefile.in for ICU
8## Stephen F. Booth
9
10srcdir = @srcdir@
11top_srcdir = @top_srcdir@
12
13top_builddir = .
14
15include $(top_builddir)/icudefs.mk
16
17docdir = $(datadir)/doc
18docsubdir = $(PACKAGE)$(ICULIBDASHSUFFIX)/html
19
20##
21
22## Build directory information
23subdir = .
24
374ca955 25#AUTOCONF = @AUTOCONF@
b75a7d8f
A
26
27## Optional directory setup
b75a7d8f 28@LAYOUT_TRUE@LAYOUT = layout layoutex
374ca955
A
29@ICUIO_TRUE@ICUIO = io
30@EXTRAS_TRUE@EXTRA = extra
b75a7d8f 31@TESTS_TRUE@TEST = test
b75a7d8f 32@SAMPLES_TRUE@SAMPLE = samples
b75a7d8f
A
33
34DOXYGEN = @DOXYGEN@
46f4442e 35DOCZIP = icu-docs.zip
b75a7d8f
A
36
37## Files to remove for 'make clean'
46f4442e 38CLEANFILES = *~
b75a7d8f
A
39
40## Files built (autoconfed) and installed
374ca955 41INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config @platform_make_fragment@ $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%)
b75a7d8f
A
42
43## Files built (autoconfed) but not installed
44LOCAL_BUILT_FILES = icudefs.mk
45
46DOCDIRS = common i18n
374ca955 47SUBDIRS = stubdata common i18n $(LAYOUT) tools data $(ICUIO) $(EXTRA) $(SAMPLE) $(TEST)
b75a7d8f
A
48
49SECTION = 1
50
51MANX_FILES = config/icu-config.$(SECTION)
52
53ALL_MAN_FILES = $(MANX_FILES)
54
55## Extra files to install [nothing at present]
56EXTRA_DATA =
57
58## List of phony targets
59.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
60install-recursive clean clean-local clean-recursive distclean \
61distclean-local distclean-recursive doc dist dist-local dist-recursive \
62check check-local check-recursive clean-recursive-with-twist install-icu \
46f4442e 63doc install-doc tests
b75a7d8f
A
64
65## Clear suffix list
66.SUFFIXES :
67
68## List of standard targets
69all: all-local all-recursive
70install: install-recursive install-local
71clean: clean-recursive-with-twist clean-local
72distclean : distclean-recursive distclean-local
73dist: dist-recursive dist-local
74check: all check-recursive check-local
374ca955 75check-recursive: all
b75a7d8f
A
76
77ifeq ($(DOXYGEN),)
78doc:
79 @echo you need Doxygen to generate documentation. Doxygen can be found on the Web
80 @echo at http://www.doxygen.org/
81else
82doc: doc/html/index.html
83
374ca955 84doc/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)
b75a7d8f
A
85 $(DOXYGEN)
86
87Doxyfile: $(srcdir)/Doxyfile.in
88 CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
46f4442e
A
89
90$(DOCZIP): doc
91 -$(RMV) $(DOCZIP)
92 ( cd doc/html ; zip -r ../../$(DOCZIP) * )
b75a7d8f
A
93endif
94
95LOCAL_SUBDIRS = $(SUBDIRS)
96CLEAN_FIRST_SUBDIRS = tools
97
374ca955
A
98$(LIBDIR) $(BINDIR):
99 -$(MKINSTALLDIRS) $@
100
b75a7d8f 101## Recursive targets
374ca955 102all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive: $(LIBDIR) $(BINDIR)
b75a7d8f
A
103 @dot_seen=no; \
104 target=`echo $@ | sed s/-recursive//`; \
105 list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
106 echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
107 if test "$$subdir" = "."; then \
108 dot_seen=yes; \
109 local_target="$$target-local"; \
110 else \
111 local_target="$$target"; \
112 fi; \
113 (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \
114 done; \
115 if test "$$dot_seen" = "no"; then \
116 $(MAKE) "$$target-local" || exit; \
117 fi
118
119clean-recursive-with-twist:
120 $(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'
121
122all-local: $(srcdir)/configure $(LOCAL_BUILT_FILES) $(INSTALLED_BUILT_FILES)
123
124install-local: install-icu install-manx
125
126install-icu: $(INSTALLED_BUILT_FILES)
127 @$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
128 @$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
129 @$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
130 @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
374ca955
A
131 $(INSTALL_DATA) @platform_make_fragment@ $(DESTDIR)$(pkgdatadir)/config/@platform_make_fragment_name@
132 $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs
46f4442e 133 $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
374ca955
A
134 $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html
135 $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
b75a7d8f
A
136 $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
137 cd $(DESTDIR)$(pkglibdir)/..; \
138 $(RM) current && ln -s $(VERSION) current; \
73c04bcf 139 $(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc
b75a7d8f
A
140
141ifeq ($(DOXYGEN),)
142install-doc:
143else
144install-doc: doc
145 $(RM) -r $(DESTDIR)$(docdir)/$(docsubdir)
146 $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(docsubdir)
147 $(INSTALL_DATA) doc/html/* $(DESTDIR)$(docdir)/$(docsubdir)
148endif
149
150$(DESTDIR)$(pkglibdir)/%: $(top_srcdir)/../data/%
151 $(INSTALL_DATA) $< $@
152
46f4442e
A
153# Build the tests, but don't run them.
154tests: all
155 $(MAKE) -C $(top_builddir)/test
156
b75a7d8f
A
157dist-local:
158
159clean-local:
160 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
46f4442e 161 $(RMV) Doxyfile doc $(DOCZIP)
b75a7d8f
A
162
163distclean-local: clean-local
b75a7d8f
A
164 $(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config
165 $(RMV) config.cache config.log config.status
46f4442e 166 $(RMV) Makefile config/Makefile icudefs.mk $(LIBDIR) $(BINDIR)
b75a7d8f
A
167
168check-local:
169
170#$(srcdir)/configure : $(srcdir)/configure.in $(top_srcdir)/aclocal.m4
171# cd $(srcdir) && $(AUTOCONF)
172
173icudefs.mk: $(srcdir)/icudefs.mk.in $(top_builddir)/config.status
174 cd $(top_builddir) \
175 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
176
b75a7d8f
A
177Makefile: $(srcdir)/Makefile.in icudefs.mk $(top_builddir)/config.status
178 cd $(top_builddir) \
179 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
180
181$(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in $(top_builddir)/config.status
182 cd $(top_builddir) \
183 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
184
185$(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
186 -$(RMV) $@
374ca955 187 $(INSTALL_SCRIPT) $(top_srcdir)/config/icu-config-top $@
73c04bcf 188 chmod u+w $@
b75a7d8f
A
189 @echo "# Following from @platform_make_fragment@" >> $@
190 sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
191 sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
192 cat $(top_srcdir)/config/icu-config-bottom >> $@
193 echo "# Rebuilt on "`date` >> $@
73c04bcf 194 chmod u-w $@
b75a7d8f
A
195
196config.status: $(srcdir)/configure $(srcdir)/common/unicode/uversion.h
197 @echo
198 @echo
199 @echo "*** config.status has become stale ***"
200 @echo " 'configure' and/or 'uversion.h' have changed, please"
201 @echo " do 'runConfigureICU' (or 'configure') again, as per"
202 @echo " the readme.html."
203 @echo
204 @echo
205 exit 1
206
207
208install-manx: $(MANX_FILES)
209 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
210 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
211
212config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
213 cd $(top_builddir) \
214 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
215