## 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) include $(srcdir)/genrb/genrbfiles.mk -include $(srcdir)/genrb/reslocal.mk ALL_RES_SOURCE= $(GENRB_SOURCE) $(TRANSLIT_SOURCE) $(RESOURCE_SRC) $(RES_SOURCE_LOCAL) UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%) CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(OBJDATADIR)/%.cnv) RES_SRC_FILES = $(ALL_RES_SOURCE:%=$(top_srcdir)/../data/%) RES_FILES = $(ALL_RES_SOURCE:%.txt=$(OBJDATADIR)/%.res) DATAFILESC=$(CNV_FILES) DATAFILESR=$(RES_FILES) DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB) $(DATAFILESR) SRCDATAFILESD=$(DATAFILESD:%.dat=%_dat.c) SRCDATAFILESR=$(DATAFILESR:%.res=%_res.c) SRCDATAFILESC=$(DATAFILESC:%.cnv=%_cnv.c) SRCDATAFILESB=$(DATAFILESB:%.brk=%_brk.c) SRCDATAFILES=$(SRCDATAFILESD) $(SRCDATAFILESC) $(SRCDATAFILESB) $(SRCDATAFILESR) $(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) blah: echo $(SRCDATAFILES) 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 @-$(RMV) 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: Objdata dir is $(OBJDATADIR) -@wc -l gencmn/mkmap.tmp -$(RMV) $(COMMONFILE) (cd gencmn ; ./gencmn -c -d ../$(OBJDATADIR) 1000000 mkmap.tmp ) -@ls -l $(COMMONFILE) build-dll: $(DATAFILES) gencmn/mkmap.tmp $(COMMONDLL) build-testdlls: $(TESTDATADLL) $(BASEDATADLL) $(BASETESTDATADLL) %_dat.c: %.dat (cd genccode ; ./genccode ../$< ) %_cnv.c: %.cnv (cd genccode ; ./genccode ../$< ) %_brk.c: %.brk (cd genccode ; ./genccode ../$< ) %_res.c: %.res (cd 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 @(cd gencmn ; gencmn -S -d ../$(OBJDATADIR) 1000000 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-S) @DATABUILDDIR@/$$file $(DESTDIR)$(pkgdatadir)/$(VERSION)/$$file || exit; \ done dist-local: clean-local: test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) distclean-local: clean-local $(RMV) 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