From bf8f435797cb1fdf756fa58c08a82f6715f6dda2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 25 Jul 2011 11:39:42 +0200 Subject: [PATCH] makefiles: Install dlls from the top-level makefile. --- Makefile.in | 5 ++++- aclocal.m4 | 43 +++++++++++++++++++++++++++++-------------- configure | 43 +++++++++++++++++++++++++++++-------------- 3 files changed, 62 insertions(+), 29 deletions(-) diff --git a/Makefile.in b/Makefile.in index ae438b2fc2a..056754b6bfe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,7 +26,10 @@ EXTRASUBDIRS = \ programs # Destination directories for make install -INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(dlldir) +INSTALLDIRS = \ + $(DESTDIR)$(bindir) \ + $(DESTDIR)$(dlldir) \ + $(DESTDIR)$(fakedlldir) all: wine @echo "Wine build complete." diff --git a/aclocal.m4 b/aclocal.m4 index 01bfa773f60..c04d269dffe 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -276,35 +276,50 @@ wine_fn_config_dll () ac_flags=$[3] ac_implib=${4:-$ac_name} ac_file=$ac_dir/lib$ac_implib + ac_dll=$ac_name ac_deps="tools/widl tools/winebuild tools/winegcc include" ac_implibflags="" case $ac_name in *16) ac_implibflags=" -m16" ;; + *.*) ;; + *) ac_dll=$ac_dll.dll ;; esac - wine_fn_all_dir_rules $ac_dir dlls/Makedll.rules + wine_fn_config_makefile $ac_dir $ac_enable "$ac_flags" dlls/Makedll.rules AS_VAR_IF([$ac_enable],[no], dnl enable_win16 is special in that it disables import libs too [test "$ac_enable" != enable_win16 || return 0], [wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"all: $ac_dir -.PHONY: $ac_dir $ac_dir/__install__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ -$ac_dir: $ac_dir/Makefile __builddeps__ dummy - @cd $ac_dir && \$(MAKE) -$ac_dir/__install__:: $ac_dir/Makefile __builddeps__ - @cd $ac_dir && \$(MAKE) install -$ac_dir/__install-lib__:: $ac_dir/Makefile __builddeps__ - @cd $ac_dir && \$(MAKE) install-lib -$ac_dir/__uninstall__:: $ac_dir/Makefile - @cd $ac_dir && \$(MAKE) uninstall -install:: $ac_dir/__install__ -install-lib:: $ac_dir/__install-lib__ -__uninstall__: $ac_dir/__uninstall__ +"$ac_dir: __builddeps__ manpages htmlpages sgmlpages xmlpages:: $ac_dir/Makefile @cd $ac_dir && \$(MAKE) \$[@]" + if wine_fn_has_flag install-lib $ac_flags + then : + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +".PHONY: $ac_dir/__install-lib__ $ac_dir/__uninstall__ +install install-lib:: $ac_dir/__install-lib__ +__uninstall__: $ac_dir/__uninstall__" + if test -n "$DLLEXT" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__install-lib__:: $ac_dir \$(DESTDIR)\$(dlldir) \$(DESTDIR)\$(fakedlldir) + \$(INSTALL_PROGRAM) $ac_dir/$ac_dll$DLLEXT \$(DESTDIR)\$(dlldir)/$ac_dll$DLLEXT + \$(INSTALL_DATA) $ac_dir/$ac_dll.fake \$(DESTDIR)\$(fakedlldir)/$ac_dll +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/$ac_dll$DLLEXT \$(DESTDIR)\$(fakedlldir)/$ac_dll" + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__install-lib__:: $ac_dir \$(DESTDIR)\$(dlldir) + \$(INSTALL_PROGRAM) $ac_dir/$ac_dll \$(DESTDIR)\$(dlldir)/$ac_dll +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/$ac_dll" + fi + fi + if test "x$enable_maintainer_mode" = xyes then if wine_fn_has_flag mc $ac_flags diff --git a/configure b/configure index bf6540fea80..20080ec9c35 100755 --- a/configure +++ b/configure @@ -14344,35 +14344,50 @@ wine_fn_config_dll () ac_flags=$3 ac_implib=${4:-$ac_name} ac_file=$ac_dir/lib$ac_implib + ac_dll=$ac_name ac_deps="tools/widl tools/winebuild tools/winegcc include" ac_implibflags="" case $ac_name in *16) ac_implibflags=" -m16" ;; + *.*) ;; + *) ac_dll=$ac_dll.dll ;; esac - wine_fn_all_dir_rules $ac_dir dlls/Makedll.rules + wine_fn_config_makefile $ac_dir $ac_enable "$ac_flags" dlls/Makedll.rules if eval test \"x\$"$ac_enable"\" = x"no"; then : test "$ac_enable" != enable_win16 || return 0 else wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ -"all: $ac_dir -.PHONY: $ac_dir $ac_dir/__install__ $ac_dir/__install-lib__ $ac_dir/__uninstall__ -$ac_dir: $ac_dir/Makefile __builddeps__ dummy - @cd $ac_dir && \$(MAKE) -$ac_dir/__install__:: $ac_dir/Makefile __builddeps__ - @cd $ac_dir && \$(MAKE) install -$ac_dir/__install-lib__:: $ac_dir/Makefile __builddeps__ - @cd $ac_dir && \$(MAKE) install-lib -$ac_dir/__uninstall__:: $ac_dir/Makefile - @cd $ac_dir && \$(MAKE) uninstall -install:: $ac_dir/__install__ -install-lib:: $ac_dir/__install-lib__ -__uninstall__: $ac_dir/__uninstall__ +"$ac_dir: __builddeps__ manpages htmlpages sgmlpages xmlpages:: $ac_dir/Makefile @cd $ac_dir && \$(MAKE) \$@" + if wine_fn_has_flag install-lib $ac_flags + then : + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +".PHONY: $ac_dir/__install-lib__ $ac_dir/__uninstall__ +install install-lib:: $ac_dir/__install-lib__ +__uninstall__: $ac_dir/__uninstall__" + if test -n "$DLLEXT" + then + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__install-lib__:: $ac_dir \$(DESTDIR)\$(dlldir) \$(DESTDIR)\$(fakedlldir) + \$(INSTALL_PROGRAM) $ac_dir/$ac_dll$DLLEXT \$(DESTDIR)\$(dlldir)/$ac_dll$DLLEXT + \$(INSTALL_DATA) $ac_dir/$ac_dll.fake \$(DESTDIR)\$(fakedlldir)/$ac_dll +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/$ac_dll$DLLEXT \$(DESTDIR)\$(fakedlldir)/$ac_dll" + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/__install-lib__:: $ac_dir \$(DESTDIR)\$(dlldir) + \$(INSTALL_PROGRAM) $ac_dir/$ac_dll \$(DESTDIR)\$(dlldir)/$ac_dll +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/$ac_dll" + fi + fi + if test "x$enable_maintainer_mode" = xyes then if wine_fn_has_flag mc $ac_flags