makefiles: Build extra targets explicitly if they are not a dependency.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-09-09 11:47:42 +02:00
parent 5adb93c654
commit 96e5ac876f
2 changed files with 6 additions and 3 deletions

View File

@ -18,8 +18,6 @@ SVG_SRCS = \
EXTRA_TARGETS = wine-debug.apk
all: wine-debug.apk
wine-debug.apk: build.gradle $(srcdir)/AndroidManifest.xml $(srcdir)/WineActivity.java $(srcdir)/wine.svg
gradle -q assembleDebug
mv build/outputs/apk/wine-debug.apk $@

View File

@ -3931,6 +3931,12 @@ static void output_sources( struct makefile *make )
add_install_rule( make, make->scripts.str[i], make->scripts.str[i],
strmake( "S$(bindir)/%s", make->scripts.str[i] ));
for (i = 0; i < make->extra_targets.count; i++)
if (strarray_exists( &make->dependencies, obj_dir_path( make, make->extra_targets.str[i] )))
strarray_add( &make->clean_files, make->extra_targets.str[i] );
else
strarray_add( &make->all_targets, make->extra_targets.str[i] );
if (!make->src_dir) strarray_add( &make->distclean_files, ".gitignore" );
strarray_add( &make->distclean_files, "Makefile" );
if (make->testdll) strarray_add( &make->distclean_files, "testlist.c" );
@ -3969,7 +3975,6 @@ static void output_sources( struct makefile *make )
strarray_addall( &make->clean_files, make->pot_files );
strarray_addall( &make->clean_files, make->debug_files );
strarray_addall( &make->clean_files, make->all_targets );
strarray_addall( &make->clean_files, make->extra_targets );
if (make->clean_files.count)
{