[PATCH 1/2] makedep: Add support for .h.in files in the local directory.

Francois Gouget fgouget at free.fr
Sat May 16 05:21:47 CDT 2020


This is needed so libraries and programs can use the Wine properties
such as PACKAGE_BUGREPORT.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---

Since most are now getting 'cross-compiled' they cannot use config.h 
and thus need another way of getting these values.

 tools/makedep.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/makedep.c b/tools/makedep.c
index 193de2d4d87..cb46d0f0809 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1472,6 +1472,16 @@ static struct file *open_include_file( const struct makefile *make, struct incl_
         return file;
     }
 
+    /* check for corresponding .in file in source dir */
+
+    if (strendswith( pFile->name, ".h" ) &&
+        (file = open_local_file( make, replace_extension( pFile->name, ".h", ".h.in" ), &filename )))
+    {
+        pFile->sourcename = filename;
+        pFile->filename = obj_dir_path( make, pFile->name );
+        return file;
+    }
+
     /* check for extra targets */
     if (strarray_exists( &make->extra_targets, pFile->name ))
     {
-- 
2.20.1




More information about the wine-devel mailing list