From faa7eae8c41f67f30e55a60eb6d99f10bd6d669a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 26 Jul 2010 12:38:11 +0200 Subject: [PATCH] makefiles: Always build the cross import libraries if crosstest is supported. --- Makefile.in | 4 ++-- aclocal.m4 | 56 +++++++++++++++++++++++++++++++------------ configure | 54 ++++++++++++++++++++++++++++++----------- dlls/Makedll.rules.in | 2 +- 4 files changed, 84 insertions(+), 32 deletions(-) diff --git a/Makefile.in b/Makefile.in index 67507a1b80d..45a3ed4df03 100644 --- a/Makefile.in +++ b/Makefile.in @@ -67,8 +67,8 @@ distclean:: clean # dependencies needed to build any dll or program __tooldeps__: libs/port libs/wine libs/wpp -__builddeps__ __buildcrossdeps__: __tooldeps__ include -.PHONY: test crosstest __tooldeps__ __builddeps__ __buildcrossdeps__ +__builddeps__: __tooldeps__ include +.PHONY: test crosstest __tooldeps__ __builddeps__ loader server: libs/port libs/wine tools fonts: tools diff --git a/aclocal.m4 b/aclocal.m4 index 085b7039dd3..67c799757f8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -246,35 +246,52 @@ uninstall manpages htmlpages sgmlpages xmlpages:: dlls/$ac_dir/Makefile then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT -__buildcrossdeps__: $ac_file.cross.a $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps $ac_file.def: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile - @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\` -$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/Makefile dummy - @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\` + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.def +$ac_file.$STATIC_IMPLIBEXT: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT install-dev:: dlls/$ac_dir/Makefile __builddeps__ @cd dlls/$ac_dir && \$(MAKE) install-dev" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: $ac_file.cross.a +$ac_file.cross.a: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.cross.a" + fi + elif test -n "$ac_implib" then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: $ac_file.$IMPLIBEXT -__buildcrossdeps__: $ac_file.cross.a -$ac_file.$IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps - @cd dlls/$ac_dir && \$(MAKE) \`basename \$[@]\` +$ac_file.$IMPLIBEXT: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.$IMPLIBEXT install-dev:: dlls/$ac_dir/Makefile __builddeps__ @cd dlls/$ac_dir && \$(MAKE) install-dev" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: $ac_file.cross.a +$ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.cross.a" + fi if test "$ac_dir" != "$ac_implib" then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: dlls/lib$ac_implib.$IMPLIBEXT -__buildcrossdeps__: dlls/lib$ac_implib.cross.a dlls/lib$ac_implib.$IMPLIBEXT: $ac_file.$IMPLIBEXT \$(RM) \$[@] && \$(LN_S) $ac_dir/lib$ac_implib.$IMPLIBEXT \$[@] -dlls/lib$ac_implib.cross.a: $ac_file.cross.a - \$(RM) \$[@] && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$[@] clean:: \$(RM) dlls/lib$ac_implib.$IMPLIBEXT" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: dlls/lib$ac_implib.cross.a +dlls/lib$ac_implib.cross.a: $ac_file.cross.a + \$(RM) \$[@] && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$[@]" + fi fi fi } @@ -326,16 +343,25 @@ $ac_name.res: $ac_name.rc $ac_name.exe" .PHONY: $ac_dir $ac_dir: $ac_dir/Makefile __builddeps__ dummy @cd $ac_dir && \$(MAKE) -crosstest: $ac_dir/__crosstest__ -.PHONY: $ac_dir/__crosstest__ -$ac_dir/__crosstest__: $ac_dir/Makefile __buildcrossdeps__ dummy - @cd $ac_dir && \$(MAKE) crosstest test: $ac_dir/__test__ .PHONY: $ac_dir/__test__ $ac_dir/__test__: dummy @cd $ac_dir && \$(MAKE) test testclean:: - \$(RM) $ac_dir/*.ok"]) + \$(RM) $ac_dir/*.ok" + + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"crosstest: $ac_dir/__crosstest__ +.PHONY: $ac_dir/__crosstest__ +$ac_dir/__crosstest__: $ac_dir/Makefile __builddeps__ dummy + @cd $ac_dir && \$(MAKE) crosstest" + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"crosstest: + @echo \"crosstest is not supported (mingw not installed?)\" && false" + fi]) } wine_fn_config_tool () diff --git a/configure b/configure index 4e2072679ac..e6fa900a9ff 100755 --- a/configure +++ b/configure @@ -14115,35 +14115,52 @@ fi then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT -__buildcrossdeps__: $ac_file.cross.a $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps $ac_file.def: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile - @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\` -$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/Makefile dummy - @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\` + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.def +$ac_file.$STATIC_IMPLIBEXT: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT install-dev:: dlls/$ac_dir/Makefile __builddeps__ @cd dlls/$ac_dir && \$(MAKE) install-dev" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: $ac_file.cross.a +$ac_file.cross.a: dlls/$ac_dir/Makefile dummy + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.cross.a" + fi + elif test -n "$ac_implib" then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: $ac_file.$IMPLIBEXT -__buildcrossdeps__: $ac_file.cross.a -$ac_file.$IMPLIBEXT $ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps - @cd dlls/$ac_dir && \$(MAKE) \`basename \$@\` +$ac_file.$IMPLIBEXT: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.$IMPLIBEXT install-dev:: dlls/$ac_dir/Makefile __builddeps__ @cd dlls/$ac_dir && \$(MAKE) install-dev" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: $ac_file.cross.a +$ac_file.cross.a: dlls/$ac_dir/$ac_dir.spec dlls/$ac_dir/Makefile $ac_deps + @cd dlls/$ac_dir && \$(MAKE) lib$ac_implib.cross.a" + fi if test "$ac_dir" != "$ac_implib" then wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "__builddeps__: dlls/lib$ac_implib.$IMPLIBEXT -__buildcrossdeps__: dlls/lib$ac_implib.cross.a dlls/lib$ac_implib.$IMPLIBEXT: $ac_file.$IMPLIBEXT \$(RM) \$@ && \$(LN_S) $ac_dir/lib$ac_implib.$IMPLIBEXT \$@ -dlls/lib$ac_implib.cross.a: $ac_file.cross.a - \$(RM) \$@ && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$@ clean:: \$(RM) dlls/lib$ac_implib.$IMPLIBEXT" + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"__builddeps__: dlls/lib$ac_implib.cross.a +dlls/lib$ac_implib.cross.a: $ac_file.cross.a + \$(RM) \$@ && \$(LN_S) $ac_dir/lib$ac_implib.cross.a \$@" + fi fi fi } @@ -14203,16 +14220,25 @@ else .PHONY: $ac_dir $ac_dir: $ac_dir/Makefile __builddeps__ dummy @cd $ac_dir && \$(MAKE) -crosstest: $ac_dir/__crosstest__ -.PHONY: $ac_dir/__crosstest__ -$ac_dir/__crosstest__: $ac_dir/Makefile __buildcrossdeps__ dummy - @cd $ac_dir && \$(MAKE) crosstest test: $ac_dir/__test__ .PHONY: $ac_dir/__test__ $ac_dir/__test__: dummy @cd $ac_dir && \$(MAKE) test testclean:: \$(RM) $ac_dir/*.ok" + + if test "x$CROSSTEST_DISABLE" = x + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"crosstest: $ac_dir/__crosstest__ +.PHONY: $ac_dir/__crosstest__ +$ac_dir/__crosstest__: $ac_dir/Makefile __builddeps__ dummy + @cd $ac_dir && \$(MAKE) crosstest" + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"crosstest: + @echo \"crosstest is not supported (mingw not installed?)\" && false" + fi fi } diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index fa8cf914dc2..6e9419ab87a 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -31,7 +31,7 @@ IMPLIB_CROSSOBJS = $(IMPLIB_OBJS:.o=.cross.o) .PHONY: $(IMPLIB_SRCS:%=__static_implib__%) -all: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) +all: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) @CROSSTEST_DISABLE@ $(IMPORTLIB:%=lib%.cross.a) $(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB)