Forking phobos

Jonathan M Davis jmdavisProg at gmx.com
Sun Apr 3 14:30:48 PDT 2011


On 2011-04-03 12:48, Aleksandar Ružičić wrote:
> I want to fork Phobos and hack a bit on it (maybe even submit some
> pull requests, someday), but I'm having trouble compiling it (on
> windows).
> This is what I've done:
> 
>  - forked phobos on github
>  - cloned the fork to my machine
>  - run make -f win32.mak
> 
> and make complained that it can't make druntime lib. So I've cloned
> druntime in same directory where i have phobos (so I now have phobos
> and druntime directories on same level),
> Did make -f win32.mak clean and tried make again, but it still
> complains about druntime:
> 
> cd ..\..\..
> Error: don't know how to make '..\druntime\lib\druntime.lib'
> 
> What I'm I doing wrong? Am I missing some more components?
> I just want to be able to edit phobos source, compile it to phobos.lib
> and link it to my d program.
> 
> I have DMC, DMD and LINK on PATH, that's not the issue...

I believe that these are the correct steps:

1. Make sure that druntime and phobos were both put at the same directory 
level. e.g. I have C:/github/druntime and C:/github/phobos.

2. Adjust your sc.ini accordingly. e.g. Mine is

=========
[Version]
version=7.51 Build 020

[Environment]
LIB="c:\github\druntime\lib";"c:\github\phobos\";"c:\dmd2\windows\lib";c:
\dm\lib
DFLAGS="-Ic:\github\phobos\";"c:\github\druntime\import"
LINKCMD=%@P%\link.exe
=========

3. Build druntime by running make -f win32.mak in the druntime directory.

4. Build Phobos by running make -f win32.mak in the phobos directory.

- Jonathan M Davis


More information about the Digitalmars-d mailing list