Project

General

Profile

Feature #2670

wscript: build a subset of tools

Added by Junxiao Shi over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
05/23/2015
Due date:
% Done:

100%

Estimated time:
2.00 h

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.


Related issues

Related to ndn-tools - Task #2692: Import ndndumpClosedJunxiao Shi

Actions
Blocked by ndn-tools - Task #2795: Introduce unit testingClosedJunxiao Shi

Actions
#1

Updated by Junxiao Shi over 6 years ago

  • Assignee changed from Junxiao Shi to Shock Jiang
#2

Updated by Junxiao Shi over 6 years ago

#3

Updated by Shock Jiang over 6 years ago

  • Status changed from New to In Progress
  • Start date set to 05/23/2015
#4

Updated by Junxiao Shi over 6 years ago

  • Blocked by Task #2795: Introduce unit testing added
#5

Updated by Junxiao Shi over 6 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.

#6

Updated by Shock Jiang over 6 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.

#7

Updated by Junxiao Shi over 6 years ago

  • Description updated (diff)
#8

Updated by Junxiao Shi over 6 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.

#9

Updated by Junxiao Shi over 6 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

#10

Updated by Junxiao Shi over 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF