[dox] C++ Interfaces

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Aug 20 22:56:20 PDT 2013


On Wed, Aug 21, 2013 at 05:50:40AM +0200, Atash wrote:
[...]
> H'okay, so, I've cloned out DMD, Druntime, Phobos, and dlang.org
> from github. Running `make -f posix.mak` in dlang.org results in
> numerous compilation errors for the D-files after invocations of
> `dmd -d -c -o- -version [yaddayaddayadda]`.

Did you build dmd/druntime/phobos yet? Were they OK?


> I also happen to be using version 2.063 of dmd from my Ubuntu
> repository...
> 
> I realize this may sound like a silly question, but... Were breaking
> changes introduced between 2.063 and 2.064? Such that I should take
> the effort to oust my current system installation of DMD in favor of
> the github one?

You can make them coexist, but for building dlang.org, you probably want
use the latest git DMD. So maybe try something like this (I assume
you're using Linux, if not, adapt appropriately):

1) Create the file /path/to/git/dmd/src/dmd.conf with the following
contents:

	[Environment]
	DFLAGS=-I/path/to/git/druntime/import -I/path/to/git/druntime/src
	-I/path/to/git/phobos -L-L/path/to/git/phobos/generated/linux/release/32
	-L-L/path/to/git/phobos/generated/linux/release/64
	-L--no-warn-search-mismatch -L--export-dynamic

where /path/to/git/* is the path to wherever you have your git repos.

2) In dlang.org, run `make -f posix.mak DMD=/path/to/git/dmd/src/dmd`.

You will probably also need to install LaTeX and a bunch of other stuff
to actually get everything to build. But for the purposes of
contributing docs, actually most of that stuff is unnecessary. The way I
did it is to just run make -j6 (or however many CPUs you have) until
web/phobos-prerelease is built, then make a symlink from
/path/to/git/web to /path/to/dlang.org/phobos-prerelease, then go to
/path/to/phobos and run `make -f posix.mak html` to generate the docs.

Kinda messy, I know, it used to be that dlang.org didn't require all
that other extra stuff like latex and kindle and whatnot, but since all
that stuff got added, I haven't gotten around to complaining about the
whole process yet. :-P  In any case, to contribute phobos docs, the
"brute force" method above should at least get you up and running (some
bits from the website may be missing, but it's not important if you're
just working on docs for a specific phobos module).


T

-- 
Кто везде - тот нигде.


More information about the Digitalmars-d mailing list