]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/genren/Makefile
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / tools / genren / Makefile
CommitLineData
f3c0d7a5
A
1# Copyright (C) 2016 and later: Unicode, Inc. and others.
2# License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
3#******************************************************************************
4#
4388f060 5# Copyright (C) 2002-2011, International Business Machines
b75a7d8f
A
6# Corporation and others. All Rights Reserved.
7#
8#******************************************************************************
9
b75a7d8f 10TOP=../..
4388f060 11
46f4442e
A
12srcdir = .
13top_srcdir = $(TOP)
46f4442e
A
14top_builddir = $(TOP)
15
4388f060
A
16# override if you have an out-of-source build (not yet working.)
17BUILDDIR = $(top_builddir)
18
46f4442e 19ICUDIR=ICUunrenamed
4388f060
A
20
21# Extra flags to prevent internal API from being hidden.
22# This is important because ELF (Linux) based platforms that don't hide internal
23# API will allow a duplicate internal name to resolve to an external library.
24# See the gcc manual on the "visibility" attribute for details.
25FLAG_OVERRIDE= LIBCFLAGS= LIBCXXFLAGS= $(EXTRA_MAKE_OPTIONS)
26
27## any local overrides
28-include Makefile.local
29
30# load definition of .SO, etc (but not if we are doing 'make clean')
31ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
32include $(BUILDDIR)/icudefs.mk
33endif
b75a7d8f 34
374ca955
A
35COM=$(ICUDIR)/lib/libicuuc.$(SO)
36I18=$(ICUDIR)/lib/libicui18n.$(SO)
374ca955 37LEX=$(ICUDIR)/lib/libiculx.$(SO)
b75a7d8f 38DAT=$(ICUDIR)/stubdata/libicudata.$(SO)
374ca955 39UIO=$(ICUDIR)/lib/libicuio.$(SO)
b75a7d8f 40
f3c0d7a5 41LIBS=$(COM) $(I18) $(LEX) $(UIO)
b75a7d8f 42
4388f060
A
43## Targets.
44
46f4442e 45
b75a7d8f
A
46all:
47 @cat README
48
49clean:
50 -rm -rf $(ICUDIR) urename.* *~
51
52# We use config.status to mean we have a valid out of source tree.
53
54$(ICUDIR)/config.status:
55 -mv $(ICUDIR) $(ICUDIR)old
56 -(rm -rf $(ICUDIR)old &)
57 mkdir $(ICUDIR)
4388f060 58 ( cd $(ICUDIR) ; CPPFLAGS=-DU_DISABLE_RENAMING=1 $(GENREN_CONFIGURE_ENV) $(top_srcdir)/../configure --with-data-packaging=archive --enable-tests=no --prefix=`pwd` $(GENREN_CONFIGURE_OPTS) )
46f4442e
A
59 # cause lib and bin to be created, and any other general sanity
60 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) clean
61 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR) all-local
b75a7d8f
A
62
63# build the libraries
64$(DAT): $(ICUDIR)/config.status Makefile
46f4442e 65 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/stubdata all-local
b75a7d8f
A
66
67$(COM): $(DAT) $(ICUDIR)/config.status Makefile
46f4442e 68 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/common all-local
b75a7d8f
A
69
70$(I18): $(DAT) $(COM) $(ICUDIR)/config.status Makefile
46f4442e 71 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/i18n all-local
b75a7d8f 72
b75a7d8f 73$(LEX): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile
46f4442e 74 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/layoutex all-local
b75a7d8f
A
75
76$(UIO): $(DAT) $(I18) $(COM) $(ICUDIR)/config.status Makefile
46f4442e 77 $(MAKE) $(FLAG_OVERRIDE) -C $(ICUDIR)/io all-local
b75a7d8f
A
78
79# the header itself
80urename.h: $(LIBS) genren.pl
81 -cp urename.h urename.h.old
46f4442e 82 perl ./genren.pl $(GENREN_PL_OPTS) $(LIBS)
b75a7d8f 83
4388f060 84# This is still here, but less useful with the "new" macro-based rename. Just use 'svn diff'.
b75a7d8f
A
85sorts: urename.sort urename.old.sort
86 @echo "*** Please check urename.h manually before committing it."
87 @echo "Try 'diff --side-by-side urename.old.sort urename.sort'"
88
89urename.sort: urename.h
90 sort urename.h > $@
91
4388f060
A
92urename.old.sort: $(top_srcdir)/common/unicode/urename.h
93 sort $(top_srcdir)/common/unicode/urename.h > $@
b75a7d8f 94
4388f060
A
95install-header: urename.h
96 cp urename.h $(top_srcdir)/common/unicode/
97 @echo "*** Please check urename.h manually before committing it."
b75a7d8f 98