wscript
changeset 4108 92bae583f934
parent 4103 a7dfdc073085
child 4109 1a251c8ad317
--- a/wscript	Sun Jan 18 12:14:32 2009 +0100
+++ b/wscript	Sun Jan 18 19:59:46 2009 +0000
@@ -306,15 +306,16 @@
 	    continue
         if os.path.isdir(os.path.join("scratch", filename)):
             obj = bld.create_ns3_program(filename, all_modules)
-            obj.path = obj.path.find_dir('scratch')
-            obj.find_sources_in_dirs(filename)
-            obj.target = os.path.join(filename, filename)
+            obj.path = obj.path.find_dir('scratch').find_dir(filename)
+            obj.find_sources_in_dirs('.')
+            obj.target = filename
             obj.name = obj.target
         elif filename.endswith(".cc"):
             name = filename[:-len(".cc")]
             obj = bld.create_ns3_program(name, all_modules)
-            obj.source = "scratch/%s" % filename
-            obj.target = "scratch/%s" % name
+            obj.path = obj.path.find_dir('scratch')
+            obj.source = filename
+            obj.target = name
             obj.name = obj.target
 
 
@@ -414,7 +415,7 @@
         # nothing more; this greatly speeds up compilation when all you
         # want to do is run a test program.
         if not Options.options.compile_targets:
-            Options.options.compile_targets = program_name
+            Options.options.compile_targets = os.path.basename(program_name)