diff --git a/Makefile.in b/Makefile.in index eb4d0dac93b..c2bb1ed4caa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,11 +32,11 @@ all: wine # Rules for re-running configure -config.status: configure +config.status: $(srcdir)/configure @./config.status --recheck include/config.h: include/stamp-h -include/stamp-h: include/config.h.in config.status +include/stamp-h: $(srcdir)/include/config.h.in config.status @./config.status include/config.h include/stamp-h # Rules for cleaning diff --git a/aclocal.m4 b/aclocal.m4 index d6f57905c95..623177258e5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -219,12 +219,15 @@ wine_fn_depend_rules () ac_makedep="\$(MAKEDEP)" ac_input=Make.vars.in:$ac_dir/Makefile.in case $[1] in - *.in) ac_input=$ac_input:$[1] ;; - *) ac_makedep="$[1] $ac_makedep" ;; + *.in) + ac_input=$ac_input:$[1] + test "$srcdir" = . || ac_alldeps="$srcdir/$ac_alldeps" ;; + *) + ac_makedep="$[1] $ac_makedep" ;; esac wine_fn_append_rule \ -"$ac_dir/Makefile: $ac_dir/Makefile.in Make.vars.in config.status $ac_alldeps \$(MAKEDEP) +"$ac_dir/Makefile: $srcdir/$ac_dir/Makefile.in $srcdir/Make.vars.in config.status $ac_alldeps \$(MAKEDEP) @./config.status --file $ac_dir/Makefile:$ac_input && cd $ac_dir && \$(MAKE) depend depend: $ac_dir/depend .PHONY: $ac_dir/depend @@ -628,7 +631,7 @@ wine_fn_config_makerules () ac_rules=$[1] ac_deps=$[2] wine_fn_append_rule \ -"$ac_rules: $ac_rules.in $ac_deps config.status +"$ac_rules: $srcdir/$ac_rules.in $ac_deps config.status @./config.status $ac_rules distclean:: \$(RM) $ac_rules" diff --git a/configure b/configure index 81a474fe998..9953777a90a 100755 --- a/configure +++ b/configure @@ -16216,12 +16216,15 @@ wine_fn_depend_rules () ac_makedep="\$(MAKEDEP)" ac_input=Make.vars.in:$ac_dir/Makefile.in case $1 in - *.in) ac_input=$ac_input:$1 ;; - *) ac_makedep="$1 $ac_makedep" ;; + *.in) + ac_input=$ac_input:$1 + test "$srcdir" = . || ac_alldeps="$srcdir/$ac_alldeps" ;; + *) + ac_makedep="$1 $ac_makedep" ;; esac wine_fn_append_rule \ -"$ac_dir/Makefile: $ac_dir/Makefile.in Make.vars.in config.status $ac_alldeps \$(MAKEDEP) +"$ac_dir/Makefile: $srcdir/$ac_dir/Makefile.in $srcdir/Make.vars.in config.status $ac_alldeps \$(MAKEDEP) @./config.status --file $ac_dir/Makefile:$ac_input && cd $ac_dir && \$(MAKE) depend depend: $ac_dir/depend .PHONY: $ac_dir/depend @@ -16641,7 +16644,7 @@ wine_fn_config_makerules () ac_rules=$1 ac_deps=$2 wine_fn_append_rule \ -"$ac_rules: $ac_rules.in $ac_deps config.status +"$ac_rules: $srcdir/$ac_rules.in $ac_deps config.status @./config.status $ac_rules distclean:: \$(RM) $ac_rules" @@ -16677,7 +16680,7 @@ wine_fn_append_rule " .INIT: Makefile .MAKEFILEDEPS: all: Makefile -Makefile: Makefile.in Make.vars.in Make.rules config.status +Makefile: $srcdir/Makefile.in $srcdir/Make.vars.in Make.rules config.status @./config.status Make.tmp Makefile" if test "x$enable_fonts" != xno; then diff --git a/configure.ac b/configure.ac index 01246529b6a..aa170640b76 100644 --- a/configure.ac +++ b/configure.ac @@ -2667,7 +2667,7 @@ WINE_APPEND_RULE([ .INIT: Makefile .MAKEFILEDEPS: all: Makefile -Makefile: Makefile.in Make.vars.in Make.rules config.status +Makefile: $srcdir/Makefile.in $srcdir/Make.vars.in Make.rules config.status @./config.status Make.tmp Makefile]) WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf],enable_fonts) diff --git a/tools/makedep.c b/tools/makedep.c index f8415c6bca5..32383f4577a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1363,7 +1363,7 @@ static void output_sources(void) if (find_src_file( "dlldata.o" )) { - output( "dlldata.c: $(WIDL) Makefile.in\n" ); + output( "dlldata.c: $(WIDL) %s\n", src_dir ? strmake("%s/Makefile.in", src_dir ) : "Makefile.in" ); column = output( "\t$(WIDL) --dlldata-only -o $@" ); LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry ) if (source->flags & FLAG_IDL_PROXY) output_filename( source->filename, &column ); @@ -1373,7 +1373,7 @@ static void output_sources(void) if (is_test) { - output( "testlist.c: $(MAKECTESTS) Makefile.in\n" ); + output( "testlist.c: $(MAKECTESTS) %s\n", src_dir ? strmake("%s/Makefile.in", src_dir ) : "Makefile.in" ); column = output( "\t$(MAKECTESTS) -o $@" ); LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry ) if (strendswith( source->name, ".c" ) && !is_generated_idl( source ))