Module: wine Branch: master Commit: aa15f41d0409584d32128c98126debada5b9c995 URL: https://gitlab.winehq.org/wine/wine/-/commit/aa15f41d0409584d32128c98126deba...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Sep 5 13:21:42 2023 +0200
makedep: Make the spec file optional for native modules.
---
dlls/fltmgr.sys/Makefile.in | 3 ++- dlls/http.sys/http.sys.spec | 1 - dlls/ksecdd.sys/Makefile.in | 8 ++++---- dlls/mountmgr.sys/mountmgr.sys.spec | 1 - dlls/ndis.sys/Makefile.in | 5 +++-- dlls/netio.sys/Makefile.in | 5 +++-- dlls/nsiproxy.sys/nsiproxy.sys.spec | 1 - dlls/scsiport.sys/Makefile.in | 5 +++-- dlls/tdi.sys/Makefile.in | 5 +++-- dlls/usbd.sys/Makefile.in | 5 +++-- dlls/winebus.sys/winebus.sys.spec | 1 - dlls/winehid.sys/winehid.sys.spec | 1 - dlls/wineusb.sys/wineusb.sys.spec | 1 - dlls/winexinput.sys/winexinput.sys.spec | 1 - tools/make_makefiles | 4 +++- tools/makedep.c | 17 ++++++----------- 16 files changed, 30 insertions(+), 34 deletions(-)
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in index ba106a43831..6ebd48d9412 100644 --- a/dlls/fltmgr.sys/Makefile.in +++ b/dlls/fltmgr.sys/Makefile.in @@ -1,5 +1,6 @@ MODULE = fltmgr.sys EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ +SOURCES = \ + fltmgr.sys.spec \ main.c diff --git a/dlls/http.sys/http.sys.spec b/dlls/http.sys/http.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/http.sys/http.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/dlls/ksecdd.sys/Makefile.in b/dlls/ksecdd.sys/Makefile.in index 2405dc6047c..b503210a2b0 100644 --- a/dlls/ksecdd.sys/Makefile.in +++ b/dlls/ksecdd.sys/Makefile.in @@ -2,7 +2,7 @@ MODULE = ksecdd.sys
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - main.c - -RC_SRCS = version.rc +SOURCES = \ + ksecdd.sys.spec \ + main.c \ + version.rc diff --git a/dlls/mountmgr.sys/mountmgr.sys.spec b/dlls/mountmgr.sys/mountmgr.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/mountmgr.sys/mountmgr.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/dlls/ndis.sys/Makefile.in b/dlls/ndis.sys/Makefile.in index baeae05d5c4..ca5400b3c3c 100644 --- a/dlls/ndis.sys/Makefile.in +++ b/dlls/ndis.sys/Makefile.in @@ -3,5 +3,6 @@ IMPORTS = advapi32 ntoskrnl iphlpapi
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - main.c +SOURCES = \ + main.c \ + ndis.sys.spec diff --git a/dlls/netio.sys/Makefile.in b/dlls/netio.sys/Makefile.in index 1cbac91c037..d5230a52c96 100644 --- a/dlls/netio.sys/Makefile.in +++ b/dlls/netio.sys/Makefile.in @@ -4,5 +4,6 @@ IMPORTS = ntoskrnl ws2_32
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - netio.c +SOURCES = \ + netio.c \ + netio.sys.spec diff --git a/dlls/nsiproxy.sys/nsiproxy.sys.spec b/dlls/nsiproxy.sys/nsiproxy.sys.spec deleted file mode 100644 index 590a204a2b0..00000000000 --- a/dlls/nsiproxy.sys/nsiproxy.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# no exported functions diff --git a/dlls/scsiport.sys/Makefile.in b/dlls/scsiport.sys/Makefile.in index 2f438737cf0..7c6c3411c98 100644 --- a/dlls/scsiport.sys/Makefile.in +++ b/dlls/scsiport.sys/Makefile.in @@ -3,5 +3,6 @@ IMPORTS = ntoskrnl
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - scsiport.c +SOURCES = \ + scsiport.c \ + scsiport.sys.spec diff --git a/dlls/tdi.sys/Makefile.in b/dlls/tdi.sys/Makefile.in index 21478b9c922..c81dd0243a5 100644 --- a/dlls/tdi.sys/Makefile.in +++ b/dlls/tdi.sys/Makefile.in @@ -2,5 +2,6 @@ MODULE = tdi.sys
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - main.c +SOURCES = \ + main.c \ + tdi.sys.spec diff --git a/dlls/usbd.sys/Makefile.in b/dlls/usbd.sys/Makefile.in index 6040071ddaf..c755df3dbbe 100644 --- a/dlls/usbd.sys/Makefile.in +++ b/dlls/usbd.sys/Makefile.in @@ -4,5 +4,6 @@ IMPORTS = ntoskrnl
EXTRADLLFLAGS = -Wl,--subsystem,native
-C_SRCS = \ - usbd.c +SOURCES = \ + usbd.c \ + usbd.sys.spec diff --git a/dlls/winebus.sys/winebus.sys.spec b/dlls/winebus.sys/winebus.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/winebus.sys/winebus.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/dlls/winehid.sys/winehid.sys.spec b/dlls/winehid.sys/winehid.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/winehid.sys/winehid.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/dlls/wineusb.sys/wineusb.sys.spec b/dlls/wineusb.sys/wineusb.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/wineusb.sys/wineusb.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/dlls/winexinput.sys/winexinput.sys.spec b/dlls/winexinput.sys/winexinput.sys.spec deleted file mode 100644 index 76421d7e35b..00000000000 --- a/dlls/winexinput.sys/winexinput.sys.spec +++ /dev/null @@ -1 +0,0 @@ -# nothing to export diff --git a/tools/make_makefiles b/tools/make_makefiles index 7bb87559da7..3cb272c5c06 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -382,7 +382,9 @@ sub assign_sources_to_makefiles(@) elsif ($name =~ /.spec$/) { my $dllflags = ${$make}{"EXTRADLLFLAGS"} || ""; - next unless defined ${$make}{"TESTDLL"} || ($dllflags =~ /-Wb,--data-only/); + next unless defined ${$make}{"TESTDLL"} || + ($dllflags =~ /-Wb,--data-only/) || + ($dllflags =~ /-Wl,--subsystem,native/); } elsif ($name =~ /.nls$/) { diff --git a/tools/makedep.c b/tools/makedep.c index 1ac2749c022..7898fd04294 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3304,15 +3304,13 @@ static const struct /******************************************************************* * output_fake_module */ -static void output_fake_module( struct makefile *make ) +static void output_fake_module( struct makefile *make, const char *spec_file ) { unsigned int arch = 0; /* fake modules are always native */ - const char *spec_file = NULL, *name = strmake( "%s%s", arch_pe_dirs[arch], make->module ); + const char *name = strmake( "%s%s", arch_pe_dirs[arch], make->module );
if (make->disabled[arch]) return;
- if (!make->is_exe) spec_file = src_dir_path( make, replace_extension( make->module, ".dll", ".spec" )); - strarray_add( &make->all_targets[arch], name ); add_install_rule( make, make->module, arch, name, strmake( "d$(dlldir)/%s", name ));
@@ -3324,11 +3322,8 @@ static void output_fake_module( struct makefile *make ) output( "\n" ); output_winegcc_command( make, arch ); output_filename( "-Wb,--fake-module" ); - if (spec_file) - { - output_filename( "-shared" ); - output_filename( spec_file ); - } + if (!make->is_exe) output_filename( "-shared" ); + if (spec_file) output_filename( spec_file ); output_filenames( make->extradllflags ); output_filenames_obj_dir( make, make->res_files[arch] ); output( "\n" ); @@ -3353,7 +3348,7 @@ static void output_module( struct makefile *make, unsigned int arch )
if (!make->is_exe) { - if (make->data_only) + if (make->data_only || strarray_exists( &make->extradllflags, "-Wl,--subsystem,native" )) { /* spec file is optional */ struct incl_file *spec = find_src_file( make, replace_extension( make->module, ".dll", ".spec" )); @@ -3415,7 +3410,7 @@ static void output_module( struct makefile *make, unsigned int arch ) output_filename( arch_make_variable( "LDFLAGS", arch )); output( "\n" );
- if (!make->data_only && !arch && unix_lib_supported) output_fake_module( make ); + if (!make->data_only && !arch && unix_lib_supported) output_fake_module( make, spec_file ); }