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