Commit 431b6459 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Generate the tools dependencies from makedep.

parent acc6306b
......@@ -74,7 +74,6 @@ CROSSTARGET = @CROSSTARGET@
SUBDIRS = @SUBDIRS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild$(TOOLSEXT)
WRC = $(TOOLSDIR)/tools/wrc/wrc$(TOOLSEXT)
PACKAGE_VERSION = @PACKAGE_VERSION@
SED_CMD = LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@srcdir\@,$(srcdir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' -e 's,@PACKAGE_VERSION\@,@PACKAGE_VERSION@,g'
......@@ -128,18 +127,12 @@ install-manpages:: manpages
# Dependencies between directories
# dependencies needed to build any dll or program
__tooldeps__: libs/port libs/wpp
__tooldeps__: libs/wpp
__builddeps__: __tooldeps__ libs/wine include po
.PHONY: depend dummy __tooldeps__ install install-lib install-dev
.PHONY: depend dummy install install-lib install-dev
dummy:
loader: libs/port libs/wine tools
server: libs/port libs/wine tools include
fonts: tools/sfnt2fon
include: tools tools/widl
libs/wine tools: libs/port
tools/sfnt2fon tools/wmc tools/wrc: tools
tools/widl tools/wmc tools/wrc: libs/wpp
server: include
libs/port libs/wine libs/wpp: include/config.h
# Misc rules
......
......@@ -286,15 +286,8 @@ wine_fn_config_test ()
wine_fn_config_tool ()
{
ac_dir=$[1]
AS_VAR_IF([enable_tools],[no],[wine_fn_append_file DISABLED_SUBDIRS $ac_dir; return])
AS_VAR_IF([enable_tools],[no],[return])
wine_fn_all_rules
wine_fn_append_rule "__tooldeps__: $ac_dir"
wine_fn_append_rule "$ac_dir: libs/port"
case $ac_dir in
tools/winebuild) wine_fn_append_rule "\$(WINEBUILD): $ac_dir" ;;
esac
}
wine_fn_config_symlink ()
......
......@@ -7805,16 +7805,9 @@ wine_fn_config_tool ()
{
ac_dir=$1
if test "x$enable_tools" = xno; then :
wine_fn_append_file DISABLED_SUBDIRS $ac_dir; return
return
fi
wine_fn_all_rules
wine_fn_append_rule "__tooldeps__: $ac_dir"
wine_fn_append_rule "$ac_dir: libs/port"
case $ac_dir in
tools/winebuild) wine_fn_append_rule "\$(WINEBUILD): $ac_dir" ;;
esac
}
wine_fn_config_symlink ()
......@@ -19348,7 +19341,9 @@ if test "x$enable_tools" != xno
then
wine_fn_append_rule "tools/makedep$ac_exeext: $srcdir/tools/makedep.c include/config.h config.status
@./config.status tools/makedep
Makefile: tools/makedep$ac_exeext"
Makefile: tools/makedep$ac_exeext
fonts: tools/sfnt2fon
include: tools tools/widl"
else
wine_fn_append_rule "\$(MAKEDEP):
@echo \"You need to run make in $TOOLSDIR first\" && false"
......
......@@ -3954,7 +3954,9 @@ then
WINE_APPEND_RULE(
[tools/makedep$ac_exeext: $srcdir/tools/makedep.c include/config.h config.status
@./config.status tools/makedep
Makefile: tools/makedep$ac_exeext])
Makefile: tools/makedep$ac_exeext
fonts: tools/sfnt2fon
include: tools tools/widl])
else
WINE_APPEND_RULE(
[\$(MAKEDEP):
......
......@@ -3409,6 +3409,7 @@ static void output_subdirs( struct makefile *make )
struct strarray testclean_files = empty_strarray;
struct strarray distclean_files = empty_strarray;
struct strarray tools_deps = empty_strarray;
struct strarray tooldeps_deps = empty_strarray;
struct strarray winetest_deps = empty_strarray;
struct strarray crosstest_deps = empty_strarray;
unsigned int i, j;
......@@ -3509,6 +3510,30 @@ static void output_subdirs( struct makefile *make )
strarray_add( &builddeps_deps, target );
}
}
else
{
if (!strcmp( submake->base_dir, "tools" ) || !strncmp( submake->base_dir, "tools/", 6 ))
{
strarray_add( &tooldeps_deps, submake->base_dir );
for (j = 0; j < submake->programs.count; j++)
output( "%s/%s%s: %s\n", submake->base_dir,
submake->programs.str[j], tools_ext, submake->base_dir );
}
if (submake->programs.count || submake->sharedlib)
{
struct strarray libs = get_expanded_make_var_array( submake, "EXTRALIBS" );
for (j = 0; j < submake->programs.count; j++)
strarray_addall( &libs, get_expanded_file_local_var( submake,
submake->programs.str[j], "LDFLAGS" ));
output( "%s: libs/port", submake->base_dir );
for (j = 0; j < libs.count; j++)
{
if (!strcmp( libs.str[j], "-lwpp" )) output_filename( "libs/wpp" );
if (!strcmp( libs.str[j], "-lwine" )) output_filename( "libs/wine" );
}
output( "\n" );
}
}
if (submake->install_rules[INSTALL_LIB].count)
{
......@@ -3532,6 +3557,13 @@ static void output_subdirs( struct makefile *make )
output( "\n" );
output_filenames( makefile_deps );
output( ":\n" );
if (tooldeps_deps.count)
{
output( "__tooldeps__:" );
output_filenames( tooldeps_deps );
output( "\n" );
strarray_add( &make->phony_targets, "__tooldeps__" );
}
if (winetest_deps.count)
{
output( "programs/winetest:" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment