scuffed-code/icu4c/source/tools/Makefile.in

207 lines
6.8 KiB
Makefile
Raw Normal View History

1999-08-16 21:50:52 +00:00
## Makefile.in for ICU tools
## Copyright (c) 1999-2000, International Business Machines Corporation and
## others. All Rights Reserved.
1999-08-16 21:50:52 +00:00
## Source directory information
1999-08-16 21:50:52 +00:00
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
include $(top_builddir)/icudefs.mk
include @platform_make_fragment@
##
CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_builddir)/common
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
1999-08-16 21:50:52 +00:00
## Build directory information
subdir = tools
# OBJDATADIR must be a short path (with ..'s) to the data.
SRCDATADIR=$(top_srcdir)/../data
OBJDATADIR=$(top_builddir)/data
# tmpdir is INSIDE pkgdata dir. if you change TMPDATADIR then the invokation
# of pkgdata will break...
TMPDATADIR=tmp
# DATABUILDDIR must be an absolute path because of the way pkgdata is invoked
# from the temporary directory.
DATABUILDDIR=$(OBJDATADIR)
2000-07-10 17:53:01 +00:00
# relative lib links from pkgdata are the same as for tmp
top_builddir_from_tmp = $(patsubst ..%,../..%,$(top_builddir))
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir_from_tmp)/common:$(top_builddir_from_tmp)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
PKGDATA = ../pkgdata/pkgdata -T . -s $(DATABUILDDIR) -O ./icupkg.inc -d $(DATABUILDDIR)
PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION)
1999-08-16 21:50:52 +00:00
## Install program information
MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
1999-08-16 21:50:52 +00:00
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
## for cleaning up libraries
STRIP = @STRIP@
1999-08-16 21:50:52 +00:00
## Package information
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SUBDIRS = ctestfw toolutil makeconv genrb genuca \
genccode genprops gennames gennorm gencmn gencnval gentz gentest pkgdata
1999-08-16 21:50:52 +00:00
## List of phony targets
2000-07-10 17:53:01 +00:00
.PHONY : all all-local all-recursive install install-local install-files install-dlls build-cmnfile build-dll \
1999-08-16 21:50:52 +00:00
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive dist dist-local dist-recursive \
2000-06-14 00:50:58 +00:00
check check-local check-recursive build-testdlls build-basetestdata build-local
1999-08-16 21:50:52 +00:00
## Clear suffix list
.SUFFIXES :
## List of standard targets
2000-06-14 00:50:58 +00:00
all: all-recursive
install: install-recursive
clean: clean-local clean-recursive
2000-06-14 00:50:58 +00:00
distclean : distclean-recursive
dist: dist-recursive
check: all check-recursive
1999-08-16 21:50:52 +00:00
## 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 "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
1999-08-16 21:50:52 +00:00
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-local"; \
1999-08-16 21:50:52 +00:00
else \
local_target="$$target"; \
1999-08-16 21:50:52 +00:00
fi; \
(cd $$subdir && $(MAKE) $$local_target) || exit; \
1999-08-16 21:50:52 +00:00
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) "$$target-local" || exit; \
1999-08-16 21:50:52 +00:00
fi
all-local: build-local
DAT_FILES=uprops.dat unames.dat cnvalias.dat tz.dat
2000-06-14 00:50:58 +00:00
# ALL of these files can be deleted (the following BRK files) - they are copied
BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk title.brk word_th.brk
2000-06-14 00:50:58 +00:00
# don't include thaidict.brk - it goes into a resource bundle - plus it isn't deleted
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/ucmebcdic.mk
#-include $(srcdir)/makeconv/ucmlocal.mk
ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_EBCDIC_SOURCE) $(UCM_SOURCE_LOCAL)
#include $(srcdir)/genrb/genrbfiles.mk
#-include $(srcdir)/genrb/reslocal.mk
ALL_RES_SOURCE= $(GENRB_SOURCE) $(TRANSLIT_SOURCE) $(RESOURCE_SRC) $(GENRB_SOURCE_LOCAL)
UCM_FILES = $(ALL_UCM_SOURCE:%=$(SRCDATADIR)/%)
CNV_FILES = $(ALL_UCM_SOURCE:%.ucm=$(OBJDATADIR)/%.cnv)
CNV_FILESL = $(ALL_UCM_SOURCE:%.ucm=%.cnv)
RES_SRC_FILES = $(ALL_RES_SOURCE:%=$(SRCDATADIR)/%)
RES_FILES = $(ALL_RES_SOURCE:%.txt=$(OBJDATADIR)/%.res)
RES_FILESL = $(ALL_RES_SOURCE:%.txt=%.res)
DATAFILESC=$(CNV_FILES)
DATAFILESR=$(RES_FILES)
DATAFILES=$(DATAFILESD) $(CNV_FILES) $(DATAFILESB) $(RES_FILES)
DATAFILESL=$(DAT_FILES) $(CNV_FILESL) $(BRK_FILES) $(RES_FILESL)
## Files to remove for 'make clean'
CLEANFILES = *~ $(BRK_FILES)
install-local:
1999-08-16 21:50:52 +00:00
dist-local:
2000-07-10 17:53:01 +00:00
clean-local: clean-pkgdata
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
test -z "$(SRCDATAFILES)" || $(RMV) $(SRCDATAFILES)
$(RMV) $(DATAFILES)
$(RMV) icupkg.inc
-@if [ -f $(TMPDATADIR)/$(ICUDATA_NAME)_dll.mak ]; then \
(cd pkgdata ; $(INVOKE) ./pkgdata -T $(TMPDATADIR) -m dll $(PKGDATA_VERSIONING) -p $(ICUDATA_NAME) -O $(DATABUILDDIR)/icupkg.inc $(TMPDATADIR)/$(ICUDATA_NAME).lst -d $(DATABUILDDIR) --clean ) \
2000-06-14 00:50:58 +00:00
fi
-@if [ -f $(TMPDATADIR)/$(ICUDATA_NAME)_common.mak ]; then \
(cd pkgdata; $(INVOKE) ./pkgdata -T $(TMPDATADIR) -m common -p $(ICUDATA_NAME) -O $(DATABUILDDIR)/icupkg.inc $(TMPDATADIR)/$(ICUDATA_NAME).lst -d $(DATABUILDDIR) --clean ) \
2000-06-14 00:50:58 +00:00
fi
-@$(RMV) $(TMPDATADIR) $(TMPDATADIR)2
2000-06-14 00:50:58 +00:00
# Clean up any old variations..
distclean-local: clean-local
$(RMV) Makefile
$(TMPDATADIR)/$(ICUDATA_NAME).lst: Makefile $(srcdir)/Makefile.in $(srcdir)/genrb/genrbfiles.mk $(srcdir)/makeconv/ucmfiles.mk
@echo "generating $@ (list of data files)"
@$(MKINSTALLDIRS) $(TMPDATADIR)
@-$(RMV) $(TMPDATADIR)/$(ICUDATA_NAME).lst
@for file in $(DATAFILESL); do \
echo $(OBJDATADIR)/$$file >> $(TMPDATADIR)/$(ICUDATA_NAME).lst; \
2000-06-14 00:50:58 +00:00
done;
$(TMPDATADIR)/testdata.lst: Makefile
$(MKINSTALLDIRS) $(TMPDATADIR)
echo $(DATABUILDDIR)/test.dat > $@
2000-07-10 17:53:01 +00:00
$(TMPDATADIR)2/testdata.lst: Makefile $(top_builddir)/test/testdata/root.res
$(MKINSTALLDIRS) $(TMPDATADIR)2
echo $(DATABUILDDIR)/test.dat > $@
echo $(DATABUILDDIR)/../test/testdata/root.res >> $@
$(TMPDATADIR)/icupkg.inc: pkgdata/icupkg.inc
$(MKINSTALLDIRS) $(TMPDATADIR)
cp pkgdata/icupkg.inc $(TMPDATADIR)/icupkg.inc
2000-06-14 00:50:58 +00:00
$(TMPDATADIR)2/icupkg.inc: pkgdata/icupkg.inc
$(MKINSTALLDIRS) $(TMPDATADIR)2
cp pkgdata/icupkg.inc $(TMPDATADIR)2/icupkg.inc
2000-07-10 17:53:01 +00:00
# build the ICU and test data
build-local:
clean-pkgdata:
-(cd $(TMPDATADIR); $(INVOKE) $(PKGDATA) -m dll -p $(ICUDATA_NAME) ./$(ICUDATA_NAME).lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
-(cd $(TMPDATADIR); $(INVOKE) $(PKGDATA) -m common -p testdat1 ./testdata.lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
-(cd $(TMPDATADIR)2; $(INVOKE) $(PKGDATA) -m common -p testdat2 ./testdata.lst --clean || echo '### Warning, cannot clean up icu/data if pkgdata is already gone.' )
-$(RMV) $(TMPDATADIR)/$(ICUDATA_NAME).lst $(TMPDATADIR)/testdata.lst $(TMPDATADIR)/icupkg.inc $(TMPDATADIR)2/testdata.lst
1999-08-16 21:50:52 +00:00
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status