Bugzilla – Bug 221
need a scratch directory
Last modified: 2008-07-01 13:32:38 UTC
For the tutorial, I think that it would be really nice to have a directory named 'scratch' in ns-3 releases (and ns-3-dev) that we can direct users to: every .cc file dropped there will be automatically built as a main program and linked against all ns-3 modules. Tom and I discussed the name: "scratch" seems like a winner...
It's not bad idea, but we should look out for: 1. It encourages monolithic programs; developers are not allowed to have multiple sources for the same program; that may create bad habits; 2. This way users won't be forced to know the wscript syntax for adding new programs, and so they will likely never learn it. We can perhaps mitigate 1 by allowing not only .cc files but also subdirectories to trigger a program build. When a subdirectory is found, all sources in it are added to a newly created program with the same name as the subdirectory.
(In reply to comment #1) > 2. This way users won't be forced to know the wscript syntax for adding new > programs, and so they will likely never learn it. I think that this is exactly the goal. If they want to contribute to ns-3, they will have to learn it. If they never do, they don't have to. > We can perhaps mitigate 1 by allowing not only .cc files but also > subdirectories to trigger a program build. When a subdirectory is found, all > sources in it are added to a newly created program with the same name as the > subdirectory. Sounds like a great extension.
Should be fixed now; reopen if a problem is found.