I think this would be useful to build a subset of Wine that could then be used to build third-party modules without having to build everything.
From: Rémi Bernon rbernon@codeweavers.com
--- configure.ac | 2 ++ tools/makedep.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac index 231ec7f17d6..510b4088596 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ AC_ARG_ENABLE(build-id, AS_HELP_STRING([--enable-build-id],[include .buildid sec AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules])) AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[use silent build rules (override: "make V=1")])) AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors])) +AC_ARG_ENABLE(toolchain, AS_HELP_STRING([--enable-toolchain],[build only the tools, headers and import libraries]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support])) AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)])) @@ -195,6 +196,7 @@ elif test -d "$wine_cv_toolsdir/tools/winebuild"; then else AC_MSG_ERROR([could not find Wine tools in $wine_cv_toolsdir]) fi +AC_SUBST(ENABLE_TOOLCHAIN,[$enable_toolchain]) AC_SUBST(toolsdir,[$wine_cv_toolsdir]) AC_SUBST(MAKEDEP,[$wine_makedep]) AC_SUBST(RUNTESTFLAGS,["-q -P wine"]) diff --git a/tools/makedep.c b/tools/makedep.c index f22552f8400..6bfe9f53fdf 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -159,6 +159,7 @@ static const char *msgfmt; static const char *ln_s; static const char *sed_cmd; static const char *wayland_scanner; +static const char *enable_toolchain; static int so_dll_supported; static int unix_lib_supported; /* per-architecture global variables */ @@ -3389,7 +3390,7 @@ static void output_module( struct makefile *make, unsigned int arch ) char *spec_file = NULL; unsigned int i, link_arch;
- if (!get_link_arch( make, arch, &link_arch )) return; + if (enable_toolchain || !get_link_arch( make, arch, &link_arch )) return;
if (!make->is_exe) { @@ -3508,6 +3509,8 @@ static void output_unix_lib( struct makefile *make ) struct strarray unix_libs = add_unix_libraries( make, &unix_deps ); unsigned int arch = 0; /* unix libs are always native */
+ /* build ntdll.so and win32u.so for toolchain builds as they might be useful to build out of tree unixlibs */ + if (enable_toolchain && strcmp( make->unixlib, "ntdll.so" ) && strcmp( make->unixlib, "win32u.so" )) return; if (make->disabled[arch]) return;
strarray_add( &make->all_targets[arch], make->unixlib ); @@ -3569,7 +3572,7 @@ static void output_test_module( struct makefile *make, unsigned int arch ) const char *debug_file; unsigned int link_arch;
- if (!get_link_arch( make, arch, &link_arch )) return; + if (enable_toolchain || !get_link_arch( make, arch, &link_arch )) return;
strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->imports, IMPORT_TYPE_DIRECT, arch ) ); strarray_addall( &all_libs, add_import_libs( make, &dep_libs, default_imports, IMPORT_TYPE_DEFAULT, arch ) ); @@ -4498,12 +4501,14 @@ int main( int argc, char *argv[] ) sed_cmd = get_expanded_make_variable( top_makefile, "SED_CMD" ); ln_s = get_expanded_make_variable( top_makefile, "LN_S" ); wayland_scanner = get_expanded_make_variable( top_makefile, "WAYLAND_SCANNER" ); + enable_toolchain = get_expanded_make_variable( top_makefile, "ENABLE_TOOLCHAIN" );
if (root_src_dir && !strcmp( root_src_dir, "." )) root_src_dir = NULL; if (tools_dir && !strcmp( tools_dir, "." )) tools_dir = NULL; if (!exe_ext) exe_ext = ""; if (!dll_ext[0]) dll_ext[0] = ""; if (!tools_ext) tools_ext = ""; + if (enable_toolchain && strcmp( enable_toolchain, "yes" )) enable_toolchain = NULL;
unix_lib_supported = !!strcmp( exe_ext, ".exe" ); so_dll_supported = !!dll_ext[0][0]; /* non-empty dll ext means supported */
`make install-dev` is a better way to achieve that.
This merge request was closed by Rémi Bernon.
Hmm, I see. I think it could be useful to add ntdll.so and win32u.so, to build out-of-tree unixlibs, but I guess I can probably use `dlls/ntdll/install-lib`/`dlls/win32u/install-lib` for now.