-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add section on configuration flags to README #1142
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR. The reason why CI doesn't like this is that the files For the change itself, I think I'm in favor of this because it's in line with what I said here: #1113 (comment). |
b487615
to
081e69d
Compare
Alright, I updated the I am wondering if it's a good idea to put the configure option descriptions in the README or in a separate docs file. |
My inclination is that they should be beside the options themselves, maybe with some sentinel like |
Will single-line comments in
But then this raises an issue with duplication. Assuming CMake functionality will be merged, and DRY principles apply, we should make the Autoconf file the source of truth for these docstrings? |
I think there's no straight answer where to put the docs if we want to support multiple build systems, and that decision shouldn't block this PR. Note that this PR doesn't really remove docs, the doc strings are still in the configure.ac macros and are presented to the user in a nice way in Entering that discussion about where to put the docs: Quoting myself from #1113 (comment):
Indeed, I think this will make the problem worse. And once we have autotools and cmake, it's not clear where the canonical source is, and also the command line arguments will look different... I still lean towards what I suggested in #1113 (comment): A table in the README, or maybe in a file referenced from the README, that has a row for every option (see mockup there). If people are motivated, it would be nice to see a worked out PR for this suggestion. If we have this table, we could either remove the strings from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK mod bikeshedding
I suggest reserving the table for the autoconf/CMake option specifiers, because we can just make the short option description as a heading above it, and the long description as a paragraph below it, so 1) the long description has more reading space, and 2) it embeds in the autogenerated Table of Contents for Markdown files. However, I advise keeping at least a simple option description in the So basically, instead of this:
We can have something like this: Configuration options-DENABLE_TESTS
Compile tests. (Default: yes) -DENABLE_EXAMPLES
Compile the examples. (Default: yes) Of course, I did not list CMake entries because that has not been merged yet, but for now, it will be an autotools list, and the manual options will be in the markdown titles. |
This change eases the use of alternate build systems by moving the variables in src/libsecp256k1-config.h to compiler macros for each invocation, preventing duplication of these variables for each build system.
7141218
to
b048f21
Compare
@real-or-random Config options have been added to the README. |
Also, do you think that the |
Concept ACK. |
It is possible now to cleanup the --- a/.gitignore
+++ b/.gitignore
@@ -44,8 +44,6 @@ coverage.*.html
*.gcno
*.gcov
-src/libsecp256k1-config.h
-src/libsecp256k1-config.h.in
build-aux/ar-lib
build-aux/config.guess
build-aux/config.sub
@@ -60,5 +58,4 @@ build-aux/m4/ltversion.m4
build-aux/missing
build-aux/compile
build-aux/test-driver
-src/stamp-h1
libsecp256k1.pc |
Concept ACK, and ACK the first commit. I'm not really a fan of the current documentation changes, with a dozen tiny tables and subsections added to the readme, which isn't very readable. I don't think that should hold up the changes here, though. We can merge it as-is, or drop the documentation changes. I'm happy to work on documenting the flags in a follow-up. |
+1 |
Agreed. Perhaps the flags could be documented separately in a separate Markdown file in the sparsely-populated |
I've included the first commit from here in #1169, as it simplifies things a bit there, but I'm happy for this PR to settle first. |
@ZenulAbidin Can you drop the commit that changes the README for now, and (optional, if you want) make the changes to Then we could get this merged and work on the doc stuff in a separate issue/PR. |
See #1178. |
@hebasto Thanks for that. I was busy with other stuff last week so couldn't get to this PR in a timely manner. I'm going to leave this open for now in case anyone has more feedback about the flags & docs. |
9c5a4d2 Do not define unused `HAVE_VALGRIND` macro (Hennadii Stepanov) ad8647f Drop no longer relevant files from `.gitignore` (Hennadii Stepanov) b627ba7 Remove dependency on `src/libsecp256k1-config.h` (Hennadii Stepanov) Pull request description: Cherry-picked the first commit from #1142 and addressed a [comment](#1142 (comment)). ACKs for top commit: sipa: utACK 9c5a4d2 real-or-random: utACK 9c5a4d2 Tree-SHA512: c6f268261fc5edee855a7e69fdf9f6c5f4b859eb1e078e3c44c3ee4c9c445738af3de9fc2fbcca90db9b9e38681da8217faaeb0735201052b16ea397a7817db9
As #1178 has been recently merged, maybe update this PR description and title? |
The changes to the documentation have been incorporated in #1372. |
This change eases the use of alternate build systems by moving the variables in src/libsecp256k1-config.h to compiler macros for each invocation, preventing duplication of these variables for each build system.
This does not include documentation for each configure option, and would need to be added in a separate commit.