From 8166be666f7a5773cb77654db56da9153c91329f Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 18 May 2004 18:42:44 +0000 Subject: [PATCH] ICU-3682 Resolve (#ifdef) the conflict with what is the os/400 fix and what was planned as the os/400 fix. X-SVN-Rev: 15375 --- icu4c/source/tools/pkgdata/make.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/icu4c/source/tools/pkgdata/make.c b/icu4c/source/tools/pkgdata/make.c index ac3108c2d8d..faa01dec2ef 100644 --- a/icu4c/source/tools/pkgdata/make.c +++ b/icu4c/source/tools/pkgdata/make.c @@ -350,9 +350,17 @@ pkg_mak_writeObjRules(UPKGOptions *o, FileStream *makefile, CharList **objects, } else { tree[0] = 0; } +#ifdef OS400 + sprintf(stanza, "$(INVOKE) $(GENCCODE) -n $(CNAME)%s -d $(TEMP_DIR) $(SRCDIR)/%s", tree, infiles->str); +#else sprintf(stanza, "$(INVOKE) $(GENCCODE) -n $(CNAME)%s -d $(TEMP_DIR) $<", tree); +#endif } else { +#ifdef OS400 + sprintf(stanza, "$(INVOKE) $(GENCCODE) -d $(TEMP_DIR) %s", infiles->str); +#else sprintf(stanza, "$(INVOKE) $(GENCCODE) -d $(TEMP_DIR) $<"); +#endif } if(o->numeric) { @@ -366,6 +374,18 @@ pkg_mak_writeObjRules(UPKGOptions *o, FileStream *makefile, CharList **objects, commands = pkg_appendToList(commands, NULL, uprv_strdup(stanza)); +#ifdef OS400 + /* This builds the file into one .c file */ + sprintf(stanza, "@cat $(TEMP_PATH)%s >> $(TEMP_PATH)/$(NAME)all.c", cfile); + commands = pkg_appendToList(commands, NULL, uprv_strdup(stanza)); + + sprintf(stanza, "@$(RMV) $(TEMP_DIR)/%s", cfile); + commands = pkg_appendToList(commands, NULL, uprv_strdup(stanza)); + + T_FileStream_write(makefile, "\t", 1); + pkg_writeCharList(makefile, commands, "\n\t",0); + T_FileStream_write(makefile, "\n\n", 2); +#else if(genFileOffset > 0) { /* for AS/400 */ sprintf(stanza, "@mv $(TEMP_PATH)%s $(TEMP_PATH)%s", cfile, cfile+genFileOffset); commands = pkg_appendToList(commands, NULL, uprv_strdup(stanza)); @@ -379,6 +399,7 @@ pkg_mak_writeObjRules(UPKGOptions *o, FileStream *makefile, CharList **objects, sprintf(stanza, "$(TEMP_PATH)%s", tmp+genFileOffset); /* for AS/400 */ pkg_mak_writeStanza(makefile, o, stanza, parents, commands); +#endif pkg_deleteList(parents); pkg_deleteList(commands);