Alexandre Julliard : makefiles: Add support for sharing resource files with parent dll.

Alexandre Julliard julliard at winehq.org
Fri Dec 21 11:44:10 CST 2018


Module: wine
Branch: master
Commit: 00c57ad89a225b840225f83e34d98c9688516944
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=00c57ad89a225b840225f83e34d98c9688516944

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 21 10:49:17 2018 +0100

makefiles: Add support for sharing resource files with parent dll.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput8/Makefile.in | 1 +
 tools/make_makefiles     | 1 +
 tools/makedep.c          | 5 ++++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in
index 53cd0c3..0ede9f0 100644
--- a/dlls/dinput8/Makefile.in
+++ b/dlls/dinput8/Makefile.in
@@ -21,4 +21,5 @@ C_SRCS = \
 IDL_SRCS = dinput8.idl
 
 RC_SRCS = \
+	dinput.rc \
 	version.rc
diff --git a/tools/make_makefiles b/tools/make_makefiles
index d1fe7f5..455ff9e 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -404,6 +404,7 @@ sub assign_sources_to_makefiles(@)
         my $parent = get_parent_makefile( $file );
         next unless $parent;
         preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "C_SRCS" );
+        preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "RC_SRCS" );
         preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "IDL_SRCS" );
         preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "LEX_SRCS" );
         preserve_shared_source_files( $makefiles{$file}, $makefiles{$parent}, "BISON_SRCS" );
diff --git a/tools/makedep.c b/tools/makedep.c
index 6b631b6..532ef52 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -89,6 +89,7 @@ struct incl_file
 
 #define FLAG_GENERATED      0x000001  /* generated file */
 #define FLAG_INSTALL        0x000002  /* file to install */
+#define FLAG_PARENTDIR      0x000004  /* file comes from parent dir */
 #define FLAG_IDL_PROXY      0x000100  /* generates a proxy (_p.c) file */
 #define FLAG_IDL_CLIENT     0x000200  /* generates a client (_c.c) file */
 #define FLAG_IDL_SERVER     0x000400  /* generates a server (_s.c) file */
@@ -1351,6 +1352,7 @@ static struct file *open_local_file( const struct makefile *make, const char *pa
         path = strmake( "%s/%s", make->parent_dir, path );
         src_path = root_dir_path( base_dir_path( make, path ));
         ret = load_file( src_path );
+        if (ret) ret->flags |= FLAG_PARENTDIR;
     }
 
     if (ret) *filename = src_dir_path( make, path );
@@ -2447,6 +2449,7 @@ static void output_po_files( const struct makefile *make )
 
         LIST_FOR_EACH_ENTRY( source, &submake->sources, struct incl_file, entry )
         {
+            if (source->file->flags & FLAG_PARENTDIR) continue;
             if (strendswith( source->name, ".rc" ) && (source->file->flags & FLAG_RC_PO))
             {
                 char *pot_file = replace_extension( source->name, ".rc", ".pot" );
@@ -2567,7 +2570,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
         output_filename( source->filename );
         output( "\n" );
     }
-    if (source->file->flags & FLAG_RC_PO)
+    if (source->file->flags & FLAG_RC_PO && !(source->file->flags & FLAG_PARENTDIR))
     {
         strarray_add( &make->clean_files, strmake( "%s.pot", obj ));
         output( "%s.pot: %s\n", obj_dir_path( make, obj ), source->filename );




More information about the wine-cvs mailing list