tools/makedep: Don't mix options and arguments for wrc/widl/sfnt2fon
Felix Janda
felix.janda at posteo.de
Wed Jun 4 11:11:21 CDT 2014
Makes the generated Makefiles also work with musl's posix getopt()
like getopt_long[_only]()
---
tools/makedep.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index 396a1e3..b7d122e 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1816,13 +1816,14 @@ 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" );
output_filenames( includes );
output_filenames( make->define_args );
output_filenames( extradefs );
+ output_filename( source->filename );
if (mo_files.count && (source->file->flags & FLAG_RC_PO))
{
strarray_add( &po_files, source->filename );
@@ -1873,12 +1874,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 +1937,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 +2044,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
More information about the wine-patches
mailing list