Bug 3030 - Add --disable-modules waf option
Add --disable-modules waf option
Product: ns-3
Classification: Unclassified
Component: build system
PC Linux
: P5 enhancement
Assigned To: Gustavo J. A. M. Carneiro
Depends on:
  Show dependency treegraph
Reported: 2018-12-10 05:39 EST by natale.patriciello
Modified: 2019-11-04 19:24 EST (History)
2 users (show)

See Also:

feature patch (2.06 KB, patch)
2018-12-10 05:39 EST, natale.patriciello
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2018-12-10 05:39:16 EST
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 EST
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 EST
This belongs in the build-system component, not core.