Alexandre Julliard : makefiles: Look in the extra targets for dependencies.
Alexandre Julliard
julliard at winehq.org
Fri Nov 30 14:34:41 CST 2018
Module: wine
Branch: master
Commit: cb078bd3bf627c668960345a625d9ff6103490d5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cb078bd3bf627c668960345a625d9ff6103490d5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Nov 30 13:09:12 2018 +0100
makefiles: Look in the extra targets for dependencies.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winetest/Makefile.in | 4 +---
programs/winetest/winetest.rc | 3 +++
tools/makedep.c | 12 +++++++++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index d74a279..2719a24 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -21,12 +21,10 @@ EXTRA_TARGETS = build.nfo
INSTALL_LIB = none
build.rc: dummy
- build="BUILD_INFO STRINGRES build.nfo STRINGTABLE { 1 \"`GIT_DIR=$(top_srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || ($(RM) $@ && exit 1)
+ build="STRINGTABLE { 1 \"`GIT_DIR=$(top_srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
build.nfo:
-$(CC) -v 2>$@
-build.res: build.nfo
-
dummy:
.PHONY: dummy
diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc
index a9dcc18..a3898b6 100644
--- a/programs/winetest/winetest.rc
+++ b/programs/winetest/winetest.rc
@@ -90,3 +90,6 @@ END
/* @makedep: winetest.ico */
IDI_WINE ICON "winetest.ico"
+
+/* @makedep: build.nfo */
+BUILD_INFO STRINGRES "build.nfo"
diff --git a/tools/makedep.c b/tools/makedep.c
index 1afac8d..355f7fc 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -170,6 +170,7 @@ struct makefile
struct strarray extradllflags;
struct strarray install_lib;
struct strarray install_dev;
+ struct strarray extra_targets;
struct list sources;
struct list includes;
const char *base_dir;
@@ -1433,6 +1434,14 @@ static struct file *open_include_file( const struct makefile *make, struct incl_
return file;
}
+ /* check for extra targets */
+ if (strarray_exists( &make->extra_targets, pFile->name ))
+ {
+ pFile->sourcename = filename;
+ pFile->filename = obj_dir_path( make, pFile->name );
+ return NULL;
+ }
+
/* now try in source dir */
if ((file = open_local_file( make, pFile->name, &pFile->filename ))) return file;
@@ -3740,7 +3749,7 @@ static void output_sources( struct makefile *make )
strarray_addall( &make->clean_files, make->object_files );
strarray_addall_uniq( &make->clean_files, make->crossobj_files );
strarray_addall( &make->clean_files, make->all_targets );
- strarray_addall( &make->clean_files, get_expanded_make_var_array( make, "EXTRA_TARGETS" ));
+ strarray_addall( &make->clean_files, make->extra_targets );
if (make->clean_files.count)
{
@@ -4044,6 +4053,7 @@ static void load_sources( struct makefile *make )
make->extradllflags = get_expanded_make_var_array( make, "EXTRADLLFLAGS" );
make->install_lib = get_expanded_make_var_array( make, "INSTALL_LIB" );
make->install_dev = get_expanded_make_var_array( make, "INSTALL_DEV" );
+ make->extra_targets = get_expanded_make_var_array( make, "EXTRA_TARGETS" );
if (make->module && strendswith( make->module, ".a" )) make->staticlib = make->module;
More information about the wine-cvs
mailing list