Alexandre Julliard : make_makefiles: Get rid of the rules for dll symlinks.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 10 15:47:04 CST 2007


Module: wine
Branch: master
Commit: 05ef63e897e9ba6620fb474b12247ed20bce3f21
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05ef63e897e9ba6620fb474b12247ed20bce3f21

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jan 10 13:58:00 2007 +0100

make_makefiles: Get rid of the rules for dll symlinks.

---

 dlls/Makefile.in     |   20 ++++--------------
 tools/make_makefiles |   52 +++++++++++++------------------------------------
 2 files changed, 19 insertions(+), 53 deletions(-)

diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 6c01980..d516530 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -287,9 +287,7 @@ BUILDSUBDIRS   = $(BASEDIRS) $(EXTRADIRS
 INSTALLSUBDIRS = $(BASEDIRS) $(EXTRADIRS) $(IMPLIBSUBDIRS)
 DOCSUBDIRS     = $(BASEDIRS) $(EXTRADIRS)
 
- at MAKE_RULES@
-
-# Symbolic links
+# 16-bit dlls
 
 WIN16_FILES = \
 	avifile.dll16 \
@@ -342,21 +340,11 @@ WIN16_FILES = \
 	wintab.dll16 \
 	wprocs.dll16
 
-SYMLINKS_SO = \
-	@WIN16_FILES@ \
-	
+ at MAKE_RULES@
 
 # Main target
 
-all: $(BUILDSUBDIRS) symlinks$(DLLEXT)
-
-.PHONY: symlinks symlinks.so implib
-
-symlinks.so: $(SYMLINKS_SO)
-
-symlinks: $(BUILDSUBDIRS)
-
-# Map symlink name to the corresponding library
+all: $(BUILDSUBDIRS) @WIN16_FILES@
 
 # Placeholders for 16-bit libraries
 
@@ -578,6 +566,8 @@ IMPORT_LIBS = \
 
 implib: $(IMPORT_LIBS)
 
+.PHONY: implib
+
 activeds/libactiveds.$(IMPLIBEXT): activeds/activeds.spec $(WINEBUILD)
 	@cd activeds && $(MAKE) libactiveds.$(IMPLIBEXT)
 
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 421170d..84c8cc2 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -332,13 +332,6 @@ sub update_dlls(@)
     my $text = "";
     my @ignores = ();
 
-    sub needs_symlink($$)
-    {
-        my ($mod, $dir) = @_;
-        $mod =~ s/\.dll$//;
-        return $mod ne $dir;
-    }
-
     foreach my $make (@_)
     {
         my %makefile = %{$makefiles{$make}};
@@ -356,7 +349,7 @@ sub update_dlls(@)
 
         next unless defined $makefile{"MODULE"};
         my $module = $makefile{"MODULE"};
-        (my $dir = $make) =~ s/^dlls\/(.*)\/[^\/]+$/$1/;
+        (my $dir = $makefile{"=dir"}) =~ s/^dlls\/(.*)\//$1/;
 
         if ($module =~ /^lib.*\.a$/)
         {
@@ -365,6 +358,8 @@ sub update_dlls(@)
         }
         else
         {
+            (my $mod = $module) =~ s/\.dll$//;
+            die "invalid directory $dir for module $module\n" unless $mod eq $dir;
             $directories{$module} = $dir;
         }
 
@@ -433,44 +428,29 @@ sub update_dlls(@)
     $text .= "INSTALLSUBDIRS = \$(BASEDIRS) \$(EXTRADIRS) \$(IMPLIBSUBDIRS)\n";
     $text .= "DOCSUBDIRS     = \$(BASEDIRS) \$(EXTRADIRS)\n";
 
-    # output the all: target
+    # output the list of 16-bit files
 
-    my %targets = ();  # use a hash to get rid of duplicate target names
-    my %targets16 = ();
+    my @targets16 = ();
     foreach my $mod (sort keys %directories)
     {
-        next if defined($special_dlls{$directories{$mod}});  # skip special dlls
-        $targets{$mod . ".so"} = 1 if needs_symlink($mod, $directories{$mod});
         next unless defined $altnames{$mod};
         foreach my $i (sort @{$altnames{$mod}})
         {
-            $targets16{$i . "16"} = $mod;
+            push @targets16, $i . "16";
         }
     }
-
-    $text .= "\n\@MAKE_RULES\@\n\n";
-    $text .= "# Symbolic links\n\n";
+    $text .= "\n# 16-bit dlls\n\n";
     $text .= "WIN16_FILES = \\\n";
-    $text .=  "\t" . join( " \\\n\t", sort keys %targets16 ) . "\n\n";
-    $text .= "SYMLINKS_SO = \\\n";
-    $text .= "\t\@WIN16_FILES\@ \\\n";
-    $text .= "\t" . join( " \\\n\t", sort keys %targets ) . "\n\n";
+    $text .=  "\t" . join( " \\\n\t", sort @targets16 ) . "\n\n";
+    $text .= "\@MAKE_RULES\@\n\n";
+
+    # output the all: target
+
     $text .= "# Main target\n\n";
-    $text .= "all: \$(BUILDSUBDIRS) symlinks\$(DLLEXT)\n\n";
-    $text .= ".PHONY: symlinks symlinks.so implib\n\n";
-    $text .= "symlinks.so: \$(SYMLINKS_SO)\n\n";
-    $text .= "symlinks: \$(BUILDSUBDIRS)\n\n";
+    $text .= "all: \$(BUILDSUBDIRS) \@WIN16_FILES\@\n\n";
 
     # output the lib name -> directory rules
 
-    $text .= "# Map symlink name to the corresponding library\n\n";
-    foreach my $mod (sort keys %directories)
-    {
-        next unless needs_symlink($mod, $directories{$mod});
-        $text .= sprintf "%s.so: %s/%s.so\n", $mod, $directories{$mod}, $mod;
-        $text .= sprintf "\t\$(RM) \$@ && \$(LN_S) %s/%s.so \$@\n\n", $directories{$mod}, $mod;
-    }
-
     $text .= "# Placeholders for 16-bit libraries\n\n";
     foreach my $mod (sort keys %directories)
     {
@@ -513,6 +493,7 @@ sub update_dlls(@)
     }
     $text .= "\n\n";
     $text .= "implib: \$(IMPORT_LIBS)\n\n";
+    $text .= ".PHONY: implib\n\n";
 
     foreach my $mod (sort keys %importlibs)
     {
@@ -541,11 +522,6 @@ sub update_dlls(@)
 
     $text .= "# Map library name to the corresponding directory\n\n";
 
-    foreach my $mod (sort keys %directories)
-    {
-        next unless needs_symlink($mod, $directories{$mod});
-        $text .= sprintf "%s/%s.so: %s\n", $directories{$mod}, $mod, $directories{$mod};
-    }
     foreach my $mod (sort keys %staticlib_dirs)
     {
         $text .= sprintf "%s/%s: %s\n", $staticlib_dirs{$mod}, $mod, $staticlib_dirs{$mod};




More information about the wine-cvs mailing list