From 9af67e3e227bb6c6e55abe2544c389bfa9c9bcf0 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Sun, 18 Mar 2007 08:06:03 +0000 Subject: [PATCH] ICU-5522 Fixes for gmake -j4 X-SVN-Rev: 21288 --- icu4c/source/data/Makefile.in | 38 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/icu4c/source/data/Makefile.in b/icu4c/source/data/Makefile.in index 9d9d272ed8..66d1dcd8a2 100644 --- a/icu4c/source/data/Makefile.in +++ b/icu4c/source/data/Makefile.in @@ -158,24 +158,24 @@ endif # We don't want to try to write over files that we are using. PKGDATA_INVOKE:=$(subst $(LIBDIR):$(top_builddir)/stubdata,$(top_builddir)/stubdata:$(LIBDIR),$(INVOKE)) $(PKGDATA_INVOKE_OPTS) -packagedata: icupkg.inc $(OUTTMPDIR)/icudata.lst build-local +packagedata: icupkg.inc $(PKGDATA_LIST) build-local ifneq ($(ENABLE_STATIC),) - $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(OUTTMPDIR)/icudata.lst + $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_LIST) endif ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) - $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst + $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) else $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR) endif ## Install ICU data. -install-local: $(OUTTMPDIR)/icudata.lst ./icupkg.inc packagedata $(OS390INSTALL) +install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL) $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR) ifneq ($(ENABLE_STATIC),) - $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(OUTTMPDIR)/icudata.lst -I $(ICUPKGDATA_INSTALL_LIBDIR) + $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) endif ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) - $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(OUTTMPDIR)/icudata.lst -I $(ICUPKGDATA_INSTALL_DIR) + $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) else $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR) endif @@ -192,7 +192,7 @@ ifeq ($(PKGDATA_MODE),dll) endif #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode -package390: $(OUTTMPDIR)/icudata390.lst $(OUTTMPDIR)/icudata.lst ./icupkg.inc packagedata +package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX) $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) @@ -286,6 +286,7 @@ endif ALL_RES_SRC= $(RES_SRC) $(TRNS_SOURCE) $(MSC_SOURCE) RES_FILES = $(ALL_RES_SRC:%.txt=$(BUILDDIR)/%.res) RES_FILES_SHORT = $(ALL_RES_SRC:%.txt=%.res) +PKGDATA_LIST = $(OUTTMPDIR)/icudata.lst INDEX_NAME=res_index INDEX_FILE=$(OUTTMPDIR)/$(INDEX_NAME).txt @@ -321,6 +322,7 @@ TRANSLIT_FILES_SHORT = $(TRANSLIT_SRC:%.txt=$(TRANSLIT_TREE)/%.res) ## All generated files ALL_FILES = $(DAT_FILES) $(CNV_FILES) $(BRK_FILES) $(CTD_FILES) $(RES_FILES) $(INDEX_RES_FILE) $(COLLATION_FILES) $(BRK_RES_FILES) $(RBNF_FILES) $(TRANSLIT_FILES) +ALL_INDEX_SRC_FILES = $(PKGDATA_LIST) $(INDEX_FILE) $(COLLATION_INDEX_FILE) $(BRK_RES_INDEX_FILE) $(RBNF_INDEX_FILE) # a list to use in the .lst files (package-relative) ALL_FILES_LIST = $(DAT_FILES_SHORT) $(CNV_FILES_SHORT) $(BRK_FILES_SHORT) $(CTD_FILES_SHORT) $(RES_FILES_SHORT) $(INDEX_RES_FILE_SHORT) $(COLLATION_FILES_SHORT) $(COLLATION_INDEX_RES_SHORT) $(BRK_RES_FILES_SHORT) $(BRK_RES_INDEX_RES_SHORT) $(RBNF_FILES_SHORT) $(RBNF_INDEX_RES_SHORT) $(TRANSLIT_FILES_SHORT) @@ -331,16 +333,16 @@ ALL_FILES_LIST = $(DAT_FILES_SHORT) $(CNV_FILES_SHORT) $(BRK_FILES_SHORT) $(CTD_ CLEANFILES = *~ icupkg.inc ifeq ($(ICUDATA_SOURCE_ARCHIVE),) -build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(OUTTMPDIR)/icudata.lst $(OS390LIST) -$(OUTTMPDIR)/icudata.lst: $(SRCLISTDEPS) +build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(PKGDATA_LIST) $(OS390LIST) +$(PKGDATA_LIST): $(SRCLISTDEPS) @echo "generating $@ (list of data files)" @-$(RMV) $@ @for file in $(ALL_FILES_LIST); do \ echo $$file >> $@; \ done; else -build-local: build-dir $(SO_VERSION_DATA) $(OUTTMPDIR)/icudata.lst $(OS390LIST) -$(OUTTMPDIR)/icudata.lst: $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE) $(MAINBUILDDIR) +build-local: build-dir $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST) +$(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE) $(MAINBUILDDIR) ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) @echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)" @-$(RMV) $@ @@ -360,7 +362,9 @@ build-dir: fi; \ done - +# The | is an order-only prerequisite. This helps when the -j option is used, +# and we don't want the files to be built before the directories are built. +$(ALL_FILES) $(ALL_INDEX_SRC_FILES): | build-dir # Now, sections for building each kind of data. @@ -439,7 +443,7 @@ $(COLBLDDIR)/%.res: $(COLSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES) $(COLBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(COLLATION_TREE) -d $(COLBLDDIR) $(INDEX_NAME).txt -$(OUTTMPDIR)/$(COLLATION_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS) +$(COLLATION_INDEX_FILE): $(SRCLISTDEPS) @echo "generating $@ (list of installed collation locales)"; \ $(RMV) $@; \ echo "// Warning this file is automatically generated" > $@; \ @@ -458,7 +462,7 @@ $(BRKBLDDIR)/%.res: $(BRKSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(BRK_FILES) $(D $(BRKBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(BREAK_TREE) -d $(BRKBLDDIR) $(INDEX_NAME).txt -$(OUTTMPDIR)/$(BREAK_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS) +$(BRK_RES_INDEX_FILE): $(SRCLISTDEPS) @echo "generating $@ (list of installed break locales)"; \ $(RMV) $@; \ echo "// Warning this file is automatically generated" > $@; \ @@ -477,7 +481,7 @@ $(RBNFBLDDIR)/%.res: $(RBNFSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) $(DAT_FILES) $(RBNFBLDDIR)/$(INDEX_NAME).res: $(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt $(BINDIR)/genrb$(EXEEXT) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -s $(OUTTMPDIR)/$(RBNF_TREE) -d $(RBNFBLDDIR) $(INDEX_NAME).txt -$(OUTTMPDIR)/$(RBNF_TREE)/$(INDEX_NAME).txt: $(SRCLISTDEPS) +$(RBNF_INDEX_FILE): $(SRCLISTDEPS) @echo "generating $@ (list of installed RBNF locales)"; \ $(RMV) $@; \ echo "// Warning this file is automatically generated" > $@; \ @@ -527,7 +531,7 @@ $(BUILDDIR)/%.res: $(MISCSRCDIR)/%.txt $(BINDIR)/genrb$(EXEEXT) -$(OUTTMPDIR)/$(INDEX_NAME).txt: $(SRCLISTDEPS) +$(INDEX_FILE): $(SRCLISTDEPS) @echo "generating $@ (list of installed locales)"; \ $(RMV) $@; \ echo "// Warning this file is automatically generated" > $@; \ @@ -540,7 +544,7 @@ $(OUTTMPDIR)/$(INDEX_NAME).txt: $(SRCLISTDEPS) echo "}" >> $@; clean-resindex: - -$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(OUTTMPDIR)/icudata.lst + -$(RMV) $(BUILDDIR)/$(INDEX_NAME).txt $(PKGDATA_LIST) $(INDEX_RES_FILE): $(INDEX_FILE) $(BINDIR)/genrb$(EXEEXT) $(INVOKE) $(BINDIR)/genrb $(GENRBOPTS) -i $(BUILDDIR) -d $(BUILDDIR) $(INDEX_FILE)