From: Felix Janda Subject: tools/makedep: Don't mix options and arguments for wrc/widl/sfnt2fon Message-Id: <20140823150452.GA6131@euler> Date: Sat, 23 Aug 2014 17:04:52 +0200 Makes the generated Makefiles also work when POSIXLY_CORRECT is set --- tools/makedep.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 396a1e3..8f98ca9 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1816,7 +1816,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t strarray_add( &res_files, strmake( "%s.res", obj )); output( "%s.res: %s %s\n", obj_dir_path( make, obj ), tools_path( make, "wrc" ), source->filename ); - output( "\t%s -o $@ %s", tools_path( make, "wrc" ), source->filename ); + output( "\t%s -o $@", tools_path( make, "wrc" ) ); if (make->is_win16) output_filename( "-m16" ); else output_filenames( target_flags ); output_filename( "--nostdinc" ); @@ -1827,13 +1827,18 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t { strarray_add( &po_files, source->filename ); output_filename( strmake( "--po-dir=%s", top_obj_dir_path( make, "po" ))); + output_filename( source->filename ); output( "\n" ); output( "%s.res:", obj_dir_path( make, obj )); output_filenames( mo_files ); output( "\n" ); output( "%s ", obj_dir_path( make, "rsrc.pot" )); } - else output( "\n" ); + else + { + output_filename( source->filename ); + output( "\n" ); + } output( "%s.res:", obj_dir_path( make, obj )); } else if (!strcmp( ext, "mc" )) /* message file */ @@ -1873,12 +1878,13 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t if (source->file->flags & FLAG_IDL_PROXY) strarray_add( &dlldata_files, source->name ); output_filenames_obj_dir( make, targets ); output( ": %s\n", tools_path( make, "widl" )); - output( "\t%s -o $@ %s", tools_path( make, "widl" ), source->filename ); + output( "\t%s -o $@", tools_path( make, "widl" ) ); output_filenames( target_flags ); output_filenames( includes ); output_filenames( make->define_args ); output_filenames( extradefs ); output_filenames( get_expanded_make_var_array( make, "EXTRAIDLFLAGS" )); + output_filename( source->filename ); output( "\n" ); output_filenames_obj_dir( make, targets ); output( ": %s", source->filename ); @@ -1935,12 +1941,16 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t for (i = 0; i < array->count; i++) { char *font = strtok( xstrdup(array->str[i]), " \t" ); - char *args = strtok( NULL, "" ); + char *args1 = strtok( NULL, "," ); + char *args2 = strtok( NULL, "" ); + *(--args2) = ','; + do args2--; while (isdigit( *args2 )); + *(args2++) = 0; strarray_add( &all_targets, xstrdup( font )); output( "%s: %s %s\n", obj_dir_path( make, font ), tools_path( make, "sfnt2fon" ), ttf_file ); - output( "\t%s -o $@ %s %s\n", tools_path( make, "sfnt2fon" ), ttf_file, args ); + output( "\t%s -o $@ %s %s %s\n", tools_path( make, "sfnt2fon" ), args1, ttf_file, args2 ); output( "install install-lib:: %s\n", font ); output( "\t$(INSTALL_DATA) %s $(DESTDIR)$(fontdir)/%s\n", obj_dir_path( make, font ), font ); @@ -2038,12 +2048,12 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t output_filenames( po_files ); output( "\n" ); output( "\t%s -O pot -o $@", tools_path( make, "wrc" )); - output_filenames( po_files ); if (make->is_win16) output_filename( "-m16" ); else output_filenames( target_flags ); output_filename( "--nostdinc" ); output_filenames( includes ); output_filenames( make->define_args ); + output_filenames( po_files ); output( "\n" ); strarray_add( &clean_files, "rsrc.pot" ); } -- 1.8.5.5