On Mon, Mar 20, 2017 at 10:11:29PM +0000, Edd Barrett wrote:
> On Mon, Mar 20, 2017 at 02:43:58PM +0100, Sebastien Marie wrote:
> > On Sun, Mar 19, 2017 at 03:55:26PM +0000, Edd Barrett wrote:
> > > 
> > > How about a separate port for docs that depends on lang/rust? Would that
> > > be more palatable?
> > 
> > I assume it could be possible, but I am unsure if rustbuild will be able to
> > generate only the documentation (and not just binary + doc). Testing is
> > required :)
> 
> I've been prodding around. There's a 'doc' target in the top-level
> Makefile.in, but we don't have a Makefile, presumably because we didn't
> use the configure script.
> 
> If I run the configure script, then run `make doc` then it will try to
> build again (including failing to get a bootstrap binary from rustup). I
> think we'd need to use the configure script from the start, and I
> appreciate there is probably a good reason not to do that.

configure script and Makefile are the legacy way to build rustc. There
are only keep for compatibility reason. The Makefile is done in a way to
call rustbuild.

The lang/rust port uses rustbuild directly (it is more flexible for the
build options). The configuration is done by generating a config.toml
(see 'configure' target in the port). And call rustbuild directly for
the build (see 'do-build' target in the port).

> But wait, earlier you said:
> 
> > the main problem with shipping doc subpackages is now it requires
> > rustdoc binary to be present in the bootstrap archive too.
> 
> Are you sure? We are already removing the rustdoc binary from the
> bootstrap tarball in the in-tree 0.15.x version, so how does the in-tree
> version make docs? It must be using it's own rustdoc?
> 

The bootstrap is generated in the same way that the port itself (and if
you read 'bootstrap' target in the port, you will see it reused the fake
framework but in different directory). So all files are installed in the
bootstrap directory, and it removes all unneeded files. Since the
beginning, rustdoc is removed from the required files to be present in
bootstrap.

In 1.15.1, the rustbuild used the generated rustdoc binary for compiling
docs. It isn't the case anymore and it is why it is a problem.


But now it is enough. Please show your code or shut up.
-- 
Sebastien Marie

Reply via email to