Alexandre Julliard : make_makefiles: Avoid duplicate .gitignore entries.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 26 10:23:59 CDT 2007


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 26 16:42:15 2007 +0200

make_makefiles: Avoid duplicate .gitignore entries.

---

 .gitignore           |    1 -
 tools/make_makefiles |    6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0e63048..ecdb9d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -442,7 +442,6 @@ dlls/rpcrt4/librpcrt4.def
 dlls/rpcrt4/tests/*.ok
 dlls/rpcrt4/tests/rpcrt4_crosstest.exe
 dlls/rpcrt4/tests/server.h
-dlls/rpcrt4/tests/server.h
 dlls/rpcrt4/tests/server_c.c
 dlls/rpcrt4/tests/server_s.c
 dlls/rpcrt4/tests/testlist.c
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 90f9220..513b5b1 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -625,11 +625,13 @@ sub update_gitignore(@)
     # prepend a slash to paths that don't have one
     @ignores = map { $_ =~ s/^([^\/]+)$/\/$1/; $_; } @ignores;
 
-    push @ignores, @_;
+    # get rid of duplicates
+    my %ignores = ();
+    foreach my $i (@ignores, @_) { $ignores{$i} = 1; }
 
     replace_in_file( ".gitignore", undef, undef,
                      "# Automatically generated by make_makefiles; DO NOT EDIT!!\n",
-                     join("\n", sort @ignores), "\n" );
+                     join("\n", sort keys %ignores), "\n" );
 }
 
 




More information about the wine-cvs mailing list