Bug 221 - need a scratch directory
need a scratch directory
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
pre-release
All All
: P3 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-14 11:42 UTC by Mathieu Lacage
Modified: 2008-07-01 13:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Lacage 2008-06-14 11:42:55 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...
Comment 1 Gustavo J. A. M. Carneiro 2008-06-14 17:35:24 UTC
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.
Comment 2 Mathieu Lacage 2008-06-15 22:53:35 UTC
(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.
Comment 3 Gustavo J. A. M. Carneiro 2008-06-16 09:15:02 UTC
Should be fixed now; reopen if a problem is found.