Bug 3030

Summary: Add --disable-modules waf option
Product: ns-3 Reporter: natale.patriciello
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: PATCH PENDING ---    
Severity: enhancement CC: ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: PC   
OS: Linux   
Attachments: feature patch

Description natale.patriciello 2018-12-10 05:39:16 UTC
Created attachment 3242 [details]
feature patch

Hi all,

with the presence of out-of-tree directories, some time it happens that switching between projects is not so easy. This patch adds the possibility of manually excluding one (or more) directories from being built. Example:

$ ./waf configure --disable-modules=notexisting,nr

...
Disable modules (nr)          : enabled
Disable modules error (notexisting) : not enabled (Module(s) not found in the list. Spelling error?)
...

The patch is still missing the backward check on the dependencies (so, if you only disable wifi, then you will have an error saying that aodv misses its dependency wifi). But that's a feature still missing from our wscript in general...
Comment 1 Tom Henderson 2019-01-01 19:27:58 UTC
I understand the benefit of this option, but it seems trickier to handle gracefully.  I wonder if tighter integration with the explicitly enabled modules list is needed.

If both --enable-modules and --disable-modules are specified, then I think the code should only proceed without error if these two sets can be reconciled (i.e. if the set of modules explicitly requested to be enabled, including all dependencies, does not include any of the requested modules to disable).

Another simpler way to handle it might be to only allow one of the above two options to be specified.
Comment 2 Peter Barnes 2019-11-04 19:24:25 UTC
This belongs in the build-system component, not core.