[PATCH v3 3/3] tools: error() if INCLUDEDIR/LIBDIR did not actually exist.
Kevin Puetz
PuetzKevinA at JohnDeere.com
Sun Feb 20 20:12:48 CST 2022
It seems more helpful to suggest using the new --wine-{lib,include}dir
options that to just return a prefix that was already checked and
did not exist or contain the right files.
Signed-off-by: Kevin Puetz <PuetzKevinA at JohnDeere.com>
--
Adding this error() revealed a latent bug in makedep: output_source_idl
already used widl --nostdinc (relative paths are sufficient, since all
the files are in src/include anyway).
But the calls to widl --dlldata-only and the TESTDLL/TESTRES wrc calls
did not, so they would use include paths from outside the source tree.
---
tools/makedep.c | 6 +++---
tools/widl/widl.c | 2 +-
tools/winegcc/winegcc.c | 5 +++--
tools/wrc/wrc.c | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/tools/makedep.c b/tools/makedep.c
index 25277efd7bb..c043e229d05 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2969,7 +2969,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source,
output_filename( obj_dir_path( make, dll_name ));
output_filename( tools_path( make, "wrc" ));
output( "\n" );
- output( "\t%secho \"%s.dll TESTDLL \\\"%s\\\"\" | %s -u -o $@\n", cmd_prefix( "WRC" ), obj, output_file,
+ output( "\t%secho \"%s.dll TESTDLL \\\"%s\\\"\" | %s -u -o $@ --nostdinc\n", cmd_prefix( "WRC" ), obj, output_file,
tools_path( make, "wrc" ));
output( "%s:", output_file);
@@ -3482,7 +3482,7 @@ static void output_test_module( struct makefile *make )
output( "\n" );
output( "programs/winetest/%s: %s%s\n", testres, obj_dir_path( make, stripped ), ext );
- output( "\t%secho \"%s TESTRES \\\"%s%s\\\"\" | %s -u -o $@\n", cmd_prefix( "WRC" ),
+ output( "\t%secho \"%s TESTRES \\\"%s%s\\\"\" | %s -u -o $@ --nostdinc\n", cmd_prefix( "WRC" ),
testmodule, obj_dir_path( make, stripped ), ext, tools_path( make, "wrc" ));
output_filenames_obj_dir( make, make->ok_files );
@@ -3715,7 +3715,7 @@ static void output_sources( struct makefile *make )
{
output( "%s: %s %s\n", obj_dir_path( make, "dlldata.c" ),
tools_path( make, "widl" ), src_dir_path( make, "Makefile.in" ));
- output( "\t%s%s --dlldata-only -o $@", cmd_prefix( "WIDL" ), tools_path( make, "widl" ));
+ output( "\t%s%s --dlldata-only -o $@ --nostdinc", cmd_prefix( "WIDL" ), tools_path( make, "widl" ));
output_filenames( make->dlldata_files );
output( "\n" );
}
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index b34b1f8cad9..41c238a3ed6 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -279,7 +279,7 @@ static const char *guess_includedir(const char *sysroot)
}
}
- return strmake( "%s%s", root, INCLUDEDIR );
+ error("could not find include/wine: add --wine-includedir\n");
}
/* clean things up when aborting on a signal */
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 983fe96c5ba..650c5adeb06 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -646,7 +646,8 @@ static const char *guess_libdir( struct options *opts )
buffer[strlen(buffer) - strlen(winecrt0)] = 0;
return buffer;
}
- return strmake( "%s%s", root, LIBDIR );
+
+ error("could not find libwinecrt0.a: add --wine-libdir\n");
}
static const char *guess_includedir(const char *sysroot)
@@ -668,7 +669,7 @@ static const char *guess_includedir(const char *sysroot)
}
}
- return strmake( "%s%s", root, INCLUDEDIR );
+ error("could not find include/wine: add --wine-includedir\n");
}
static void init_argv0_dir( const char *argv0 )
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index c9ce35abe58..a55375bc5f6 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -248,7 +248,7 @@ static const char *guess_includedir(const char *sysroot)
}
}
- return strmake( "%s%s", root, INCLUDEDIR );
+ error("could not find include/wine: add --wine-includedir\n");
}
/* clean things up when aborting on a signal */
--
2.34.1
More information about the wine-devel
mailing list