This is needed so libraries and programs can use the Wine properties such as PACKAGE_BUGREPORT.
Signed-off-by: Francois Gouget fgouget@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 )) {
Using config.h is not allowed when cross-compiling so wineboot must get the PACKAGE_BUGREPORT from its own .h.in file.
Signed-off-by: Francois Gouget fgouget@free.fr --- programs/wineboot/Makefile.in | 3 +++ programs/wineboot/{resource.h => resource.h.in} | 3 +++ programs/wineboot/wineboot.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) rename programs/wineboot/{resource.h => resource.h.in} (88%)
diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in index 3921fa96444..b3f3db5f4e7 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -9,6 +9,9 @@ C_SRCS = \ shutdown.c \ wineboot.c
+IN_SRCS = \ + resource.h.in + RC_SRCS = wineboot.rc
MANPAGES = wineboot.man.in diff --git a/programs/wineboot/resource.h b/programs/wineboot/resource.h.in similarity index 88% rename from programs/wineboot/resource.h rename to programs/wineboot/resource.h.in index 4ff3c69e2d5..6be109e2a8a 100644 --- a/programs/wineboot/resource.h +++ b/programs/wineboot/resource.h.in @@ -25,3 +25,6 @@
#define IDD_ENDTASK 100 #define IDD_WAITDLG 101 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index ac0b04d6d81..ec0732edcd8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -891,7 +891,7 @@ static BOOL pendingRename(void) if( res!=ERROR_SUCCESS ) { WINE_ERR("Couldn't query value after successfully querying before (%u),\n" - "please report to wine-devel@winehq.org\n", res); + "please report to %s\n", res, PACKAGE_BUGREPORT); res=FALSE; goto end; }
On 5/16/20 12:22 PM, Francois Gouget wrote:
Using config.h is not allowed when cross-compiling so wineboot must get the PACKAGE_BUGREPORT from its own .h.in file.
Signed-off-by: Francois Gouget fgouget@free.fr
programs/wineboot/Makefile.in | 3 +++ programs/wineboot/{resource.h => resource.h.in} | 3 +++ programs/wineboot/wineboot.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) rename programs/wineboot/{resource.h => resource.h.in} (88%)
diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in index 3921fa96444..b3f3db5f4e7 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -9,6 +9,9 @@ C_SRCS = \ shutdown.c \ wineboot.c
+IN_SRCS = \
resource.h.in
RC_SRCS = wineboot.rc
MANPAGES = wineboot.man.in
diff --git a/programs/wineboot/resource.h b/programs/wineboot/resource.h.in similarity index 88% rename from programs/wineboot/resource.h rename to programs/wineboot/resource.h.in index 4ff3c69e2d5..6be109e2a8a 100644 --- a/programs/wineboot/resource.h +++ b/programs/wineboot/resource.h.in @@ -25,3 +25,6 @@
#define IDD_ENDTASK 100 #define IDD_WAITDLG 101
+/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index ac0b04d6d81..ec0732edcd8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -891,7 +891,7 @@ static BOOL pendingRename(void) if( res!=ERROR_SUCCESS ) { WINE_ERR("Couldn't query value after successfully querying before (%u),\n"
"please report to wine-devel@winehq.org\n", res);
"please report to %s\n", res, PACKAGE_BUGREPORT); res=FALSE; goto end; }
Hi!
Wouldn't it make sense to have a global crossconfig.h.in for this and for possibly other constants, as the number of cross-compiled modules grows, and to support the third party PE dependencies thing?
Francois Gouget fgouget@free.fr writes:
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index ac0b04d6d81..ec0732edcd8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -891,7 +891,7 @@ static BOOL pendingRename(void) if( res!=ERROR_SUCCESS ) { WINE_ERR("Couldn't query value after successfully querying before (%u),\n"
"please report to wine-devel@winehq.org\n", res);
"please report to %s\n", res, PACKAGE_BUGREPORT);
This message is clearly useless and should be removed. In general, I don't think we want to add complexity to use PACKAGE_BUGREPORT, saying "please report it" should be good enough.