From 1c40426e950329aa898333c5137fefb271f863fb Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 14 Jun 2002 02:09:08 +0000 Subject: [PATCH] Removed install_libdir targets and centralized the symlinks creation in the main dll makefile. --- dlls/Makedll.rules.in | 10 ---------- dlls/Makefile.in | 23 +++++++++++++++++++++-- dlls/gdi/Makefile.in | 3 --- dlls/kernel/Makefile.in | 3 --- dlls/make_dlls | 25 +++++++++++++++++++++++-- dlls/ntdll/Makefile.in | 3 --- dlls/user/Makefile.in | 3 --- dlls/winspool/Makefile.in | 3 --- dlls/x11drv/Makefile.in | 4 ++-- 9 files changed, 46 insertions(+), 31 deletions(-) diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 7a201fc2266..1ed192adc25 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -72,14 +72,4 @@ install:: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT)) uninstall:: $(RM) $(dlldir)/$(MODULE)$(DLLEXT) $(ALTNAMES:%=$(dlldir)/%$(DLLEXT)) -# Extra install rules for dlls not yet properly separated - -install_libdir:: install_lib - cd $(libdir) && $(RM) lib$(MODULE).$(LIBEXT) && if [ "$(dlldir)" = "$(libdir)/wine" ]; \ - then $(LN_S) wine/$(MODULE)$(DLLEXT) lib$(MODULE).$(LIBEXT); \ - else $(LN_S) $(dlldir)/$(MODULE)$(DLLEXT) lib$(MODULE).$(LIBEXT); fi - -uninstall_libdir:: - $(RM) $(libdir)/lib$(MODULE).$(LIBEXT) - # End of global dll rules diff --git a/dlls/Makefile.in b/dlls/Makefile.in index b3266026b81..4332809cf6a 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -741,6 +741,8 @@ x11drv: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32. # Special targets for dlls that we need to link to +LINKABLE_DLLS = ntdll.dll gdi32.dll user32.dll kernel32.dll + libntdll.dll.$(LIBEXT): ntdll $(RM) $@ && $(LN_S) ntdll/ntdll.dll$(DLLEXT) $@ @@ -753,14 +755,31 @@ libuser32.dll.$(LIBEXT): user libkernel32.dll.$(LIBEXT): kernel $(RM) $@ && $(LN_S) kernel/kernel32.dll$(DLLEXT) $@ +uninstall-links: dummy + $(RM) $(LINKABLE_DLLS:%=$(libdir)/lib%.$(LIBEXT)) + +install-links: uninstall-links dummy + cd $(libdir) && if [ "$(dlldir)" = "$(libdir)/wine" ]; \ + then \ + $(LN_S) wine/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \ + $(LN_S) wine/gdi32.dll$(DLLEXT) libgdi32.dll.$(LIBEXT); \ + $(LN_S) wine/user32.dll$(DLLEXT) libuser32.dll.$(LIBEXT); \ + $(LN_S) wine/kernel32.dll$(DLLEXT) libkernel32.dll.$(LIBEXT); \ + else \ + $(LN_S) $(dlldir)/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \ + $(LN_S) $(dlldir)/gdi32.dll$(DLLEXT) libgdi32.dll.$(LIBEXT); \ + $(LN_S) $(dlldir)/user32.dll$(DLLEXT) libuser32.dll.$(LIBEXT); \ + $(LN_S) $(dlldir)/kernel32.dll$(DLLEXT) libkernel32.dll.$(LIBEXT); \ + fi + # Misc rules $(BUILDSUBDIRS:%=%/__checklink__): dummy @cd `dirname $@` && $(MAKE) checklink -install:: $(BUILDSUBDIRS:%=%/__install__) +install:: $(BUILDSUBDIRS:%=%/__install__) install-links -uninstall:: $(BUILDSUBDIRS:%=%/__uninstall__) +uninstall:: $(BUILDSUBDIRS:%=%/__uninstall__) uninstall-links -rmdir $(dlldir) check test:: $(BUILDSUBDIRS:%=%/__test__) diff --git a/dlls/gdi/Makefile.in b/dlls/gdi/Makefile.in index 388813e85b1..7e273941f79 100644 --- a/dlls/gdi/Makefile.in +++ b/dlls/gdi/Makefile.in @@ -87,7 +87,4 @@ version16.res: version16.rc gdi.exe.spec.c: version16.res -install:: install_libdir -uninstall:: uninstall_libdir - ### Dependencies: diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in index 7e9d455bf55..eb543c22dc9 100644 --- a/dlls/kernel/Makefile.in +++ b/dlls/kernel/Makefile.in @@ -62,7 +62,4 @@ version16.res: version16.rc krnl386.exe.spec.c: version16.res -install:: install_libdir -uninstall:: uninstall_libdir - ### Dependencies: diff --git a/dlls/make_dlls b/dlls/make_dlls index c448f626b60..ba663c5fa39 100755 --- a/dlls/make_dlls +++ b/dlls/make_dlls @@ -240,12 +240,33 @@ foreach my $mod (keys %imports) } print NEWMAKE "\n# Special targets for dlls that we need to link to\n\n"; +printf NEWMAKE "LINKABLE_DLLS = %s\n\n", join( " ", keys %linkable_dlls ); + foreach my $mod (keys %linkable_dlls) { printf NEWMAKE "lib%s.\$(LIBEXT): %s\n", $mod, $directories{$mod}; printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/%s\$(DLLEXT) \$@\n\n", $directories{$mod}, $mod; } +print NEWMAKE <