From f64a6753cb3c99cf7872dc2a6d2e5f9945ff6cdf Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 9 Jul 2011 17:58:47 +0200 Subject: [PATCH] makefiles: Install static libraries from the top-level makefile. --- Makefile.in | 2 +- aclocal.m4 | 16 +++++++++++++++- configure | 16 +++++++++++++++- dlls/Makeimplib.rules.in | 9 --------- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Makefile.in b/Makefile.in index c06fab886a5..ae438b2fc2a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,7 +26,7 @@ EXTRASUBDIRS = \ programs # Destination directories for make install -INSTALLDIRS = $(DESTDIR)$(bindir) +INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(dlldir) all: wine @echo "Wine build complete." diff --git a/aclocal.m4 b/aclocal.m4 index 9036f3771c3..0fc84fe7b14 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -249,7 +249,21 @@ wine_fn_config_lib () ac_name=$[1] ac_flags=$[2] ac_dir=dlls/$ac_name - wine_fn_config_makefile $ac_dir enable_$ac_name $ac_flags,install-dev dlls/Makeimplib.rules + wine_fn_config_makefile $ac_dir enable_$ac_name "$ac_flags" dlls/Makeimplib.rules + + if wine_fn_has_flag install-dev $ac_flags + then : + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +".PHONY: $ac_dir/__install__ $ac_dir/__uninstall__ +$ac_dir/__install__:: $ac_dir \$(DESTDIR)\$(dlldir) + \$(INSTALL_DATA) $ac_dir/lib$ac_name.a \$(DESTDIR)\$(dlldir)/lib$ac_name.a +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_name.a +install install-dev:: $ac_dir/__install__ +__uninstall__: $ac_dir/__uninstall__" + fi + wine_fn_append_rule ALL_MAKEFILE_DEPENDS "__builddeps__: $ac_dir" wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir: tools/widl tools/winebuild tools/winegcc include" } diff --git a/configure b/configure index 7c26578e771..2a82bb5a1bb 100755 --- a/configure +++ b/configure @@ -14616,7 +14616,21 @@ wine_fn_config_lib () ac_name=$1 ac_flags=$2 ac_dir=dlls/$ac_name - wine_fn_config_makefile $ac_dir enable_$ac_name $ac_flags,install-dev dlls/Makeimplib.rules + wine_fn_config_makefile $ac_dir enable_$ac_name "$ac_flags" dlls/Makeimplib.rules + + if wine_fn_has_flag install-dev $ac_flags + then : + else + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +".PHONY: $ac_dir/__install__ $ac_dir/__uninstall__ +$ac_dir/__install__:: $ac_dir \$(DESTDIR)\$(dlldir) + \$(INSTALL_DATA) $ac_dir/lib$ac_name.a \$(DESTDIR)\$(dlldir)/lib$ac_name.a +$ac_dir/__uninstall__:: + \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_name.a +install install-dev:: $ac_dir/__install__ +__uninstall__: $ac_dir/__uninstall__" + fi + wine_fn_append_rule ALL_MAKEFILE_DEPENDS "__builddeps__: $ac_dir" wine_fn_append_rule ALL_MAKEFILE_DEPENDS "$ac_dir: tools/widl tools/winebuild tools/winegcc include" } diff --git a/dlls/Makeimplib.rules.in b/dlls/Makeimplib.rules.in index a02cb4d31c6..fa3f984ee1f 100644 --- a/dlls/Makeimplib.rules.in +++ b/dlls/Makeimplib.rules.in @@ -8,7 +8,6 @@ DLLFLAGS = @DLLFLAGS@ DEFS = -D__WINESRC__ $(EXTRADEFS) -INSTALLDIRS = $(DESTDIR)$(dlldir) MAKEDEPFLAGS = -xo -xcross.o @MAKE_RULES@ @@ -27,12 +26,4 @@ $(MODULE:%=lib%.cross.a): $(CROSSOBJS) Makefile.in $(CROSSAR) $(ARFLAGS) $@ $(CROSSOBJS) $(CROSSRANLIB) $@ -# Rules for installation - -install install-dev:: $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir) - $(INSTALL_DATA) $(MODULE:%=lib%.a) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a) - -uninstall:: - $(RM) $(DESTDIR)$(dlldir)/$(MODULE:%=lib%.a) - # End of global library rules