Update of /cvsroot/monetdb/buildtools/autogen/autogen
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31601

Modified Files:
        codegen.py 
Log Message:
Prevent doubles from being entered in the targets list.


Index: codegen.py
===================================================================
RCS file: /cvsroot/monetdb/buildtools/autogen/autogen/codegen.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- codegen.py  10 Aug 2007 11:41:15 -0000      1.11
+++ codegen.py  13 Sep 2007 08:43:41 -0000      1.12
@@ -213,9 +213,10 @@
         for pat,newext in code_extract[ext]:
             if pat.search(b) is not None:
                 extracted = base + newext
-                targets.append( extracted )
+                if extracted not in targets:
+                    targets.append( extracted )
                 deps[extracted] = [ f ]
-    else:
+    elif f not in targets:
         targets.append(f)
 
 # In the code generation phase targets are generated using input files
@@ -234,13 +235,14 @@
                 changes = 1
                 for newext in code_map[ext]:
                     newtarget = base + newext
-                    ntargets.append(newtarget)
+                    if newtarget not in ntargets:
+                        ntargets.append(newtarget)
                     if deps.has_key(newtarget):
                         if (f not in deps[newtarget]):
                             deps[newtarget].append(f)
                     else:
                         deps[newtarget] = [ f ]
-            else:
+            elif f not in ntargets:
                 ntargets.append(f)
         targets = ntargets
     return targets


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to