Opened 5 years ago

Closed 5 years ago

#791 closed enhancement (fixed)

Adjust the output of ./configure --help

Reported by: Дилян Палаузов Owned by: Olly Betts
Priority: normal Milestone: 1.4.12
Component: Build system Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

For features that have only two states, the output of “./configure --help” shall print for enabled feautures, only how to disable them, and for disabled features, how to enable them.

I mean, replace the current output of xapian-core/configure --help:

--enable-64bit-docid enable 64bit docid [default=no] --enable-backend-chert build the chert database backend [default=yes]

with

--enable-64bit-docid enable 64bit docid --disable-backend-chert build the chert database backend

Attachments (2)

xapian-791.patch (2.6 KB ) - added by Дилян Палаузов 5 years ago.
For features enabled by default, print on "./configure --help" how to disalbe them
xapian-791-master.patch (2.2 KB ) - added by Дилян Палаузов 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Дилян Палаузов, 5 years ago

Correction, replace to:

--enable-64bit-docid            enable 64bit docid
--disable-backend-chert         don't build the chert database backend

comment:2 by Olly Betts, 5 years ago

Note that you can write --enable-64bit-docid=no or --disable-64bit-docid - the meaning is exactly the same (and the same as what you get by default). This is explained just above:

  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

This is how autoconf-generated configure scripts standardly work.

But if you think you can make the help output clearer, clean patches are welcome.

by Дилян Палаузов, 5 years ago

Attachment: xapian-791.patch added

For features enabled by default, print on "./configure --help" how to disalbe them

comment:3 by Дилян Палаузов, 5 years ago

https://xapian.org/features does not state, that Xapian runs on MSDOS, therefore ./configure shall not disable the remote backend on this platform.

comment:4 by Olly Betts, 5 years ago

Are you happy to license your contributions as detailed at https://xapian-developer-guide.readthedocs.io/en/latest/contributing/licensing.html ?

It looks like this is a patch for 1.4.x - we need to patch git master first (if we just patch 1.4, the change will be lost when we start a new stable release series).

I'm not keen on getting rid of the handling of default values in the macro - just inlining that for cases where the default is non-trivial result in less maintainable code, especially on git master where this handling is used more extensively.

https://xapian.org/features does not state, that Xapian runs on MSDOS, therefore ./configure shall not disable the remote backend on this platform.

That's not (and not intended to be) a complete list of every feature in Xapian - we can't start ripping out anything not mentioned there.

MSDOS probably isn't a very relevant platform at this point, but DJGPP still seems active so it seems premature to start ripping out support, especially when the motivation seems to be to try to make an unrelated patch easier. And even if we did drop support, that wouldn't be a suitable change for a stable release series.

by Дилян Палаузов, 5 years ago

Attachment: xapian-791-master.patch added

comment:5 by Дилян Палаузов, 5 years ago

I agree to https://xapian-developer-guide.readthedocs.io/en/latest/contributing/licensing.html .

On master the handling of the default values for databases gets more complicated and if the XAPIAN_BACKEND_ENABLE macro is kept, stripping “default=yes” just for the honey backend, makes the code unnecessary complicated.

comment:6 by Olly Betts, 5 years ago

Milestone: 1.4.12
Resolution: fixed
Status: newclosed

Thanks. I've applied the initial hunks, but left the defaulting of parameters in the macro alone. You're right that there's only one place they're used currently, but there's more uses in the 1.4 branch, and they'll be used again more in the future.

Applied to master in 1371d5a4d7ab7d11b9e5483fbd6ef00db0033ad9 and backported for 1.4.12 in 9b33fd1d842e32f4f43c569bf51953fd9381848d.

Note: See TracTickets for help on using tickets.