## Makefile.in for ICU tools ## Copyright (c) 1999-2000, International Business Machines Corporation and ## others. All Rights Reserved. ## Shell to use SHELL = @SHELL@ VERSION = @VERSION@ ## Install directory information srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ CC = @CC@ CXX = @CXX@ CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_builddir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ @host_frag@ bindir = @bindir@ sbindir = @sbindir@ datadir = @datadir@ libdir = @libdir@ includedir = @includedir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ ## Build directory information top_builddir = .. subdir = tools # OBJDATADIR must be a short path (with ..'s) to the data. # @RELATIVEDATADIR@ exists soley for this line. ICUDATADIR=$(pkgdatadir)/$(VERSION) SRCDATADIR=$(top_srcdir)/../data OBJDATADIR=$(top_builddir)/@RELATIVEDATADIR@ ## Install program information mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ## for cleaning up libraries STRIP = @STRIP@ ## Package information PACKAGE = @PACKAGE@ VERSION = @VERSION@ SUBDIRS = ctestfw toolutil makeconv genrb gencol rbdump \ genccode genprops gennames gencmn gencnval gentz gentest ## List of phony targets .PHONY : all all-local all-recursive install install-local install-everything install-files install-dlls build-data build-cmnfile build-dll \ install-recursive clean clean-local clean-recursive distclean \ distclean-local distclean-recursive dist dist-local dist-recursive \ check check-local check-recursive build-testdlls build-basetestdata ## Clear suffix list .SUFFIXES : ## List of standard targets all: all-recursive all-local install: install-recursive install-local clean: clean-recursive clean-local distclean : distclean-recursive distclean-local dist: dist-recursive dist-local check: check-recursive check-local ## Recursive targets all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive: @dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-local"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $$local_target) || exit; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) "$$target-local" || exit 1; \ fi all-local: build-local DAT_FILES=uprops.dat unames.dat cnvalias.dat tz.dat BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk word_th.brk DATAFILESD=$(DAT_FILES:%=$(OBJDATADIR)/%) DATAFILESB=$(BRK_FILES:%=$(OBJDATADIR)/%) # copy the right endianness ifeq (@U_IS_BIG_ENDIAN@,1) $(OBJDATADIR)/%.brk: $(SRCDATADIR)/%BE.brk cp $< $@ else $(OBJDATADIR)/%.brk: $(SRCDATADIR)/%LE.brk cp $< $@ endif include $(srcdir)/makeconv/ucmfiles.mk -include $(srcdir)/makeconv/ucmlocal.mk ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL) UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%) CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(OBJDATADIR)/%.cnv) DATAFILESC=$(CNV_FILES) DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB) SRCDATAFILESD=$(DATAFILESD:%.dat=%_dat.c) SRCDATAFILESC=$(DATAFILESC:%.cnv=%_cnv.c) SRCDATAFILESB=$(DATAFILESB:%.brk=%_brk.c) SRCDATAFILES=$(SRCDATAFILESD) $(SRCDATAFILESC) $(SRCDATAFILESB) $(OBJDATADIR)/icudata_dat.c OBJDATAFILES=$(SRCDATAFILES:%.c=%.o) COMMONFILE=$(OBJDATADIR)/icudata.dat COMMONDLL=$(OBJDATADIR)/libicudata.$(SO) #the files for creating the test data TESTDATAFILE=test.dat TESTDATAD=$(TESTDATAFILE:%=$(OBJDATADIR)/%) TESTDATAFILEC=$(TESTDATAD:.dat=_dat.c) OBJTESTFILE=$(TESTDATAFILEC:%.c=%.o) TESTDATADLL=$(OBJDATADIR)/libtest_dat.$(SO) BASEDATADLL=$(OBJDATADIR)/libbase_dat.$(SO) BASETESTDATADLL=$(OBJDATADIR)/libbase_test_dat.$(SO) BASETESTDATA=base_test.dat build-basetestdata: @echo Generating the base test data file (base_test.dat) from (test.dat) @cp $(TESTDATAD) $(SRCDATADIR)/$(BASETESTDATA) @ls -l $(SRCDATADIR)/$(BASETESTDATA) # the files to be installed -- the COMMON ones + any stragglers UDATA_FILES=icudata.dat UDATA_DLLS=libicudata.$(SO) ### use the "--enable-mapped=" option to configure, to get mapped file behavior. # the case where '--enable-mapped=yes' @USE_MAPPED_TRUE@build-local: build-data build-cmnfile build-basetestdata # the case where '--enable-mapped=no' (DEFAULT) @USE_MAPPED_FALSE@build-local: build-data build-dll build-testdlls ### # check for any other generated data here install-data: $(DATAFILES) build-cmnfile: $(COMMONFILE) # the -Wpath [etc] has relative DLL paths in it # so we have to cd into the other dir.. gencmn/mkmap.tmp: Makefile $(DATAFILES) @echo -n Generating $@ list of data files @-rm -f gencmn/mkmap.tmp @for file in $(DATAFILES); do \ echo `pwd`/$$file >> gencmn/mkmap.tmp; \ done; $(COMMONFILE): $(DATAFILES) gencmn/mkmap.tmp @echo -n Generating common file $(COMMONFILE). Number of files: -@wc -l gencmn/mkmap.tmp -rm -f $(COMMONFILE) @gencmn/gencmn -c -d $(OBJDATADIR) 1000000 gencmn/mkmap.tmp -@ls -l $(COMMONFILE) build-dll: $(DATAFILES) gencmn/mkmap.tmp $(COMMONDLL) build-testdlls: $(TESTDATADLL) $(BASEDATADLL) $(BASETESTDATADLL) %_dat.c: %.dat genccode/genccode $< %_cnv.c: %.cnv genccode/genccode $< %_brk.c: %.brk genccode/genccode $< ## Note: this generates a dummy C++ file to cause the HPUX CC linker ## to load exception handling (when requested..) hpux_junk_obj.cpp: echo "void to_emit_cxx_stuff_in_the_linker(){}" >> hpux_junk_obj.cpp hpux_junk_obj.o: hpux_junk_obj.cpp $(COMPILE.cc) -o $@ $< # strip is optional # -$(STRIP) $@ # HPUX_JUNK_OBJ is usually unset except by mh-hpux-cc $(OBJDATADIR)/icudata_dat.c: $(DATAFILES) gencmn/mkmap.tmp @gencmn/gencmn -S -d $(OBJDATADIR) 1000000 gencmn/mkmap.tmp $(COMMONDLL): $(OBJDATAFILES) $(HPUX_JUNK_OBJ) $(SHLIB.c) -o $@ $^ -ls -l $@ $(TESTDATADLL) $(BASEDATADLL) $(BASETESTDATADLL): $(OBJTESTFILE) $(HPUX_JUNK_OBJ) $(SHLIB.c) -o $@ $^ -ls -l $@ srcs: $(SRCDATAFILES) ## Files to remove for 'make clean' CLEANFILES = *~ $(BRK_FILES) $(OBJDATAFILES) $(HPUX_JUNK_OBJ) $(OBJTESTFILE) \ $(COMMONDLL) $(TESTDATADLL) $(BASEDATADLL) $(BASETESTDATADLL) ### use the "--enable-mapped=" option to configure, to get mapped file behavior. # the case where '--enable-mapped=yes' - raw files [which can be mapped] @USE_MAPPED_TRUE@install-udata: install-files # the case where '--enable-mapped=no' (DEFAULT) - DLL's [so's to you] @USE_MAPPED_FALSE@install-udata: install-dlls ### install-local: build-local install-udata install-everything: install-files install-dlls install-files: @for file in $(UDATA_FILES); do \ echo $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file; \ $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file || exit; \ done install-dlls: @for file in $(UDATA_DLLS); do \ echo $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file; \ $(INSTALL_DATA) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file || exit; \ done dist-local: clean-local: test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-local: clean-local rm -f Makefile $(SRCDATAFILES) $(DATAFILES) $(TESTDATAD) $(BASETESTDATA) check-local: Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status