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