Skip to content
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

Build and install documentation as part as the default build process #7911

Conversation

serge-sans-paille
Copy link

This should fix #7897

@g-w1
Copy link
Contributor

g-w1 commented Jan 29, 2021

This takes a looong time. I had to kill it after 5 mins because it was eating my cpu:
image
In comparison, master:
image
Maybe add it behind a -D flag? I agree, this is desirable to have in the build system.

@serge-sans-paille
Copy link
Author

@g-w1 I made doc an optional target, so that it only triggers if one runs ninja doc

@g-w1
Copy link
Contributor

g-w1 commented Jan 29, 2021

You should also put documentation for this somewhere (pun intended).

@serge-sans-paille
Copy link
Author

@g-w1 I made doc an optional target, so that it only triggers if one runs ninja doc

You should also put documentation for this somewhere (pun intended).

That was a good one :-) I propose to update https://github.com/ziglang/zig/wiki/Building-Zig-From-Source once this PR is merged.

@Jan200101
Copy link
Contributor

There are various things missing in the CMakeLists.txt that are present in the build.zig so I wonder if that was on purpose

@serge-sans-paille
Copy link
Author

@Jan200101 I don't know either. Is that blocking for this PR?

@Jan200101
Copy link
Contributor

I wouldn't call it blocking but its up in the air if this is desired behavior

@Vexu
Copy link
Member

Vexu commented Jan 30, 2021

I don't see the point of doing this instead of make && ./zig build docs.

@serge-sans-paille
Copy link
Author

  1. make doc sounds more explicit than ./zig build docs to me
  2. make doc && make install would install documentation in a standard location

@Jan200101
Copy link
Contributor

It could be argued that the CMakeLists.txt is only there to get to a fully functional Zig and with that you can do anything else using zig build

@serge-sans-paille
Copy link
Author

Indeed :-)

@g-w1
Copy link
Contributor

g-w1 commented Jan 30, 2021

Indeed :-)

If you agree with this, then it would make sense that building documentation is not part of getting a fully functional zig and it should be done with zig build docs.

@serge-sans-paille
Copy link
Author

I'm currently packaging zig for Fedora. As a packager, I see value in the doc installation step, but in the end it's up to you and no big deal to me to do it explicitly if upstream is not interested ;-)

@Jan200101
Copy link
Contributor

I'm currently packaging zig for Fedora. As a packager, I see value in the doc installation step, but in the end it's up to you and no big deal to me to do it explicitly if upstream is not interested ;-)

you can build the docs just fine for a fedora package
I have done so myself

@andrewrk
Copy link
Member

We will have this eventually, but it will not be via cmake. A zig build will build the self-hosted compiler as well as the docs. For now, the process is a bit more cumbersome, while we work on bootstrapping.

@andrewrk andrewrk closed this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate documentation as part of the build process
5 participants