Bug 1354 - Building scratch subdir programs is broken
authorSebastian Rohde
Mon, 13 Feb 2012 18:21:06 +0000
changeset 7706 a0892c367ea1
parent 7705 f1c54b0cc754
child 7707 42c37d556d61
Bug 1354 - Building scratch subdir programs is broken
scratch/subdir/scratch-simulator-subdir.cc
wscript
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scratch/subdir/scratch-simulator-subdir.cc	Mon Feb 13 18:21:06 2012 +0000
@@ -0,0 +1,27 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "ns3/core-module.h"
+
+NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
+
+using namespace ns3;
+
+int 
+main (int argc, char *argv[])
+{
+  NS_LOG_UNCOND ("Scratch Simulator");
+}
--- a/wscript	Mon Feb 13 18:15:22 2012 +0000
+++ b/wscript	Mon Feb 13 18:21:06 2012 +0000
@@ -625,7 +625,7 @@
         if os.path.isdir(os.path.join("scratch", filename)):
             obj = bld.create_ns3_program(filename, all_modules)
             obj.path = obj.path.find_dir('scratch').find_dir(filename)
-            obj.find_sources_in_dirs('.')
+            obj.source = obj.path.ant_glob('*.cc')
             obj.target = filename
             obj.name = obj.target
             obj.install_path = None