Feature #2670
closedwscript: build a subset of tools
100%
Description
During ./waf configure
, allow selecting a subset of tools.
For every tool, wscript
should automatically define --enable-X
option and --disable-X
option, where X is the directory name for the tool.
The semantics of those options is:
- If any
--enable-
* option is used, only those tools specified by--enable-
* options are selected. - If no
--enable-
* option is used, all tools excepted those specified by--disable-
* options are selected. - It's an error to specify both
--enable-X
and--disable-X
for tool X.
Dependency detection for deselected tools should be skipped.
Unit testing for deselected tools should not be built.
Updated by Junxiao Shi over 9 years ago
- Assignee changed from Junxiao Shi to Shock Jiang
Updated by Junxiao Shi over 9 years ago
- Related to Task #2692: Import ndndump added
Updated by Shock Jiang over 9 years ago
- Status changed from New to In Progress
- Start date set to 05/23/2015
Updated by Junxiao Shi over 9 years ago
- Blocked by Task #2795: Introduce unit testing added
Updated by Junxiao Shi over 9 years ago
I feel the --enable-X
and --disable-X
combination is too complex, and the help messages associated with those configuration options cannot clearly convey the select/deselect logic.
What about the alternate design:
- Declare a single command line option:
--enable-tools=X,Y,Z
. - The argument to this command line option is a comma-separated list where each token is the directory name of a tool.
- The help message should display the full list.
- When this option is specified, only those tools appearing in the list are selected, and all other tools are deselected.
- When this option is omitted, all tools are selected.
Also, when a tool is deselected, its unit testing should not be built. Therefore, this Feature is blocked by #2795.
Updated by Shock Jiang over 9 years ago
this is not big difference as I can see. I prefer to stick on the commonly used way, enable-X, disable-X, which seems more explicit.
Updated by Junxiao Shi over 9 years ago
commit:4e99475245535b63b569e89e786c5a2e7b3e00a2 correctly implements the selection of programs and test suites.
However, all manpages are built regardless of the selections.
Since we placed all manpages in the same directory, I can't think of a feasible solution to select which manpages to build.
Updated by Junxiao Shi over 9 years ago
I have tested commit:331784dd439c5526c72373f2dd610167de7d0659 with below configure lines.
All configure lines are working correctly.
./waf configure --enable-ping --disable-ping
Expected: error
./waf configure --disable-ping --enable-ping
Expected: error
./waf configure --enable-ping
Expected: no libpcap
detection; build ping
./waf configure --disable-dump
Expected: no libpcap
detection; do not build dump
./waf configure --with-tests --enable-ping
Expected: build unit testing for ping
./waf configure --with-tests --disable-ping
Expected: do not build unit testing for ping
./waf configure --with-tests --enable-dump
Expected: do not build unit testing for ping
./waf configure --with-tests
Expected: build all tools; build unit testing for ping
Updated by Junxiao Shi over 9 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100