Jump to page: 1 24  
Page
Thread overview
Attempt to get rid of phobos Makefiles, using reggae
Jun 04, 2015
Atila Neves
Jun 05, 2015
Atila Neves
Jun 04, 2015
Mike
Jun 05, 2015
Atila Neves
Jun 05, 2015
Joakim
Jun 05, 2015
Daniel N
Jun 05, 2015
Atila Neves
Jun 05, 2015
Jacob Carlborg
Jun 05, 2015
Atila Neves
Jun 05, 2015
Meta
Jun 05, 2015
Dicebot
Jun 06, 2015
Atila Neves
Jun 06, 2015
Atila Neves
Jun 06, 2015
Joakim
Jun 29, 2015
Atila Neves
Jun 29, 2015
Mike
Jun 29, 2015
Atila Neves
Jun 29, 2015
Jonathan M Davis
Jun 29, 2015
Atila Neves
Jun 29, 2015
Joakim
Jun 29, 2015
Atila Neves
Jun 30, 2015
Joakim
Jun 30, 2015
Atila Neves
Jun 29, 2015
Jacob Carlborg
Jun 29, 2015
Dmitry Olshansky
Jun 29, 2015
Dicebot
Jun 29, 2015
Dmitry Olshansky
Jun 30, 2015
Mike
Jun 06, 2015
Joakim
Jun 06, 2015
Jacob Carlborg
June 04, 2015
http://dpaste.dzfl.pl/562f1ddc1aad

This can build the static and dynamic libraries on Linux. I then linked to the static version to make sure my programs still worked. They did.

For other OSs there'd be some logic to select different files. It was a pain figuring out exactly what posix.mak did but at least this works. Is this horrible or is this the kind of direction we might want to go? Also, why are some Linux files not being built on Linux with the current Makefile?

In theory this approach would mean readable build descriptions in D, and only one of them for all OSs instead of 3 makefiles. Also, never again typing `make clean`.

Once reggae has a binary backend this would mean no dependency on make, ninja or tup. Just a D compiler.


Atila
June 04, 2015
On 6/4/15 5:50 PM, Atila Neves wrote:
> http://dpaste.dzfl.pl/562f1ddc1aad
>
> This can build the static and dynamic libraries on Linux. I then linked
> to the static version to make sure my programs still worked. They did.
>
> For other OSs there'd be some logic to select different files. It was a
> pain figuring out exactly what posix.mak did but at least this works. Is
> this horrible or is this the kind of direction we might want to go?
> Also, why are some Linux files not being built on Linux with the current
> Makefile?
>
> In theory this approach would mean readable build descriptions in D, and
> only one of them for all OSs instead of 3 makefiles. Also, never again
> typing `make clean`.
>
> Once reggae has a binary backend this would mean no dependency on make,
> ninja or tup. Just a D compiler.

This is very cool.

I read somewhere that reggae builds itself. I'd suggest a way to build reggae with only OS-provided common tools, since you'd have to include it in the toolchain in order to build dmd/phobos otherwise.

-Steve
June 04, 2015
On Thursday, 4 June 2015 at 21:50:41 UTC, Atila Neves wrote:

> Is this horrible or is this the kind of direction we might want to go?

This is a nice work, but I think I would prefer a library over a tool.

I envision a single package with much of what you've already built (Target struct, Build template, etc...) that I can simply import into my own build.d file, and call with rdmd.  Maybe even get it merged into phobos as std.build.

Mike
June 05, 2015
On Thursday, 4 June 2015 at 21:50:41 UTC, Atila Neves wrote:
> http://dpaste.dzfl.pl/562f1ddc1aad
>
> This can build the static and dynamic libraries on Linux. I then linked to the static version to make sure my programs still worked. They did.
>
> For other OSs there'd be some logic to select different files. It was a pain figuring out exactly what posix.mak did but at least this works. Is this horrible or is this the kind of direction we might want to go? Also, why are some Linux files not being built on Linux with the current Makefile?
>
> In theory this approach would mean readable build descriptions in D, and only one of them for all OSs instead of 3 makefiles. Also, never again typing `make clean`.
>
> Once reggae has a binary backend this would mean no dependency on make, ninja or tup. Just a D compiler.

Nice, I'm looking forward to the day we can get rid of makefiles to build the D toolchain, as they're such an anachronism.  Having the build configured in D itself would be wonderful, :) really looking forward to using reggae.  Since dmd already requires a host D compiler to build now, there certainly isn't any problem with the D dependency.
June 05, 2015
On Thursday, 4 June 2015 at 21:50:41 UTC, Atila Neves wrote:
> In theory this approach would mean readable build descriptions in D, and only one of them for all OSs instead of 3 makefiles. Also, never again typing `make clean`.
>
> Once reggae has a binary backend this would mean no dependency on make, ninja or tup. Just a D compiler.
>
>
> Atila

Sweet! Would you be in favor of adding Exclude-Dirs as well?
June 05, 2015
> I read somewhere that reggae builds itself. I'd suggest a way to build reggae with only OS-provided common tools, since you'd have to include it in the toolchain in order to build dmd/phobos otherwise.

It can build itself, yes. Since I've only developed and tested it on Linux, the `bootstrap.sh` script in the repo builds it by calling dmd on all the sources. After that it can (and does) build itself. There'd have to be a .bat for Windows but any other POSIX system should be able to call `bootstrap.sh`.

Atila
June 05, 2015
On Thursday, 4 June 2015 at 23:28:37 UTC, Mike wrote:
> On Thursday, 4 June 2015 at 21:50:41 UTC, Atila Neves wrote:
>
>> Is this horrible or is this the kind of direction we might want to go?
>
> This is a nice work, but I think I would prefer a library over a tool.
>
> I envision a single package with much of what you've already built (Target struct, Build template, etc...) that I can simply import into my own build.d file, and call with rdmd.  Maybe even get it merged into phobos as std.build.

I thought of that during DConf. It's "run this tool that includes your description and runs the compiler for you" vs "as a library now I have to build the build generator myself". It didn't seem to make much sense to me since it'd just be more work.

I could always split the code into libreggae and have the reggae tool depend on it, but at this point I'm not convinced.

Atila
June 05, 2015
On Friday, 5 June 2015 at 07:56:49 UTC, Daniel N wrote:
> On Thursday, 4 June 2015 at 21:50:41 UTC, Atila Neves wrote:
>> In theory this approach would mean readable build descriptions in D, and only one of them for all OSs instead of 3 makefiles. Also, never again typing `make clean`.
>>
>> Once reggae has a binary backend this would mean no dependency on make, ninja or tup. Just a D compiler.
>>
>>
>> Atila
>
> Sweet! Would you be in favor of adding Exclude-Dirs as well?

I guess. I'd need some evidence it'd be needed first though. I am toying with the idea of passing in parameters in any order, which would make adding optional seldom used things like ExcludeDirs easier.

TBH I don't understand why other people mix files that are built with ones that aren't in the same directory tree.

Atila
June 05, 2015
On 2015-06-04 23:50, Atila Neves wrote:
> http://dpaste.dzfl.pl/562f1ddc1aad

Reggae doesn't support shell globbing of files? Something like:

ExcludeFiles(["std/c/windows/**/*.d"]);

Or just specifying a directory.

BTW, why are some Linux specific files ignored?

-- 
/Jacob Carlborg
June 05, 2015
On Friday, 5 June 2015 at 09:22:14 UTC, Jacob Carlborg wrote:
> On 2015-06-04 23:50, Atila Neves wrote:
>> http://dpaste.dzfl.pl/562f1ddc1aad
>
> Reggae doesn't support shell globbing of files? Something like:
>
> ExcludeFiles(["std/c/windows/**/*.d"]);

Not right now, no. The good thing about how it's designed is you could write your own. Of course, the whole point is to have usable high-level builtins as well. It's a good idea, but like I said before, I hardly ever have to exclude anything in my own projects. Feel free to open an enhancement request.

> Or just specifying a directory.

I think somebody else mentioned that already.

> BTW, why are some Linux specific files ignored?

No clue, I just went with the output of `make -f posix.mak`. It's the kind of thing that'd be more explicit if the build description were in D. It was one of my questions in the original post ;)

Atila

« First   ‹ Prev
1 2 3 4