ICU-608 files mode, update
X-SVN-Rev: 3253
This commit is contained in:
parent
49b97e6289
commit
5c6cbb5d39
@ -67,11 +67,15 @@ void pkg_mode_files(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
|
||||
const char *baseName;
|
||||
|
||||
fprintf(stderr, " ####### Warning! Files mode is still experimental. -srl\n");
|
||||
|
||||
|
||||
/* Dont' copy files already in tmp */
|
||||
for(infiles = o->filePaths;infiles;infiles = infiles->next)
|
||||
{
|
||||
baseName = findBasename(infiles->str);
|
||||
|
||||
uprv_strcpy(tmp, o->targetDir);
|
||||
uprv_strcpy(tmp, o->tmpDir);
|
||||
uprv_strcat(tmp, U_FILE_SEP_STRING);
|
||||
uprv_strcat(tmp, baseName);
|
||||
|
||||
@ -84,7 +88,7 @@ void pkg_mode_files(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
continue;
|
||||
}
|
||||
|
||||
uprv_strcpy(tmp2, o->targetDir);
|
||||
uprv_strcpy(tmp2, o->tmpDir);
|
||||
uprv_strcat(tmp2, U_FILE_SEP_STRING);
|
||||
uprv_strcat(tmp2, U_FILE_SEP_STRING);
|
||||
uprv_strcat(tmp2, baseName);
|
||||
@ -99,6 +103,7 @@ void pkg_mode_files(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
/* left hand side: target path, target name */
|
||||
copyFilesLeft = pkg_appendToList(copyFilesLeft, ©FilesLeftTail, uprv_strdup(tmp));
|
||||
|
||||
fprintf(stderr, "##### COPY %s\n", tmp2);
|
||||
/* rhs: source path */
|
||||
copyFilesRight = pkg_appendToList(copyFilesRight, ©FilesRightTail, uprv_strdup(infiles->str));
|
||||
|
||||
@ -124,8 +129,10 @@ void pkg_mode_files(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
T_FileStream_writeLine(makefile, "\n");
|
||||
|
||||
|
||||
T_FileStream_writeLine(makefile, "all: $(COPIEDDEST)\n\n");
|
||||
|
||||
T_FileStream_writeLine(makefile, "all: $(TARGETDIR)/$(NAME)\n\n");
|
||||
T_FileStream_writeLine(makefile, "$(TARGETDIR)/$(NAME):\n");
|
||||
T_FileStream_writeLine(makefile, "\t@-$(RMV) $(TARGETDIR)/$(NAME)\n");
|
||||
T_FileStream_writeLine(makefile, "\tln -s $(shell pwd) $(TARGETDIR)/$(NAME)\n\n");
|
||||
/* commands for the make rule */
|
||||
tail = NULL;
|
||||
copyCommands = pkg_appendToList(copyCommands, &tail, uprv_strdup("$(INSTALL_DATA) $? $(TARGETDIR)"));
|
||||
|
Loading…
Reference in New Issue
Block a user