Live data from Hacker News

Qake: GNU Make-based build system with a different approach

github.com

21–30 of 33 posts

Re: Qake: GNU Make-based build system with a different approach

#21
post #14

I've been recently using Tup [0] with great success in a project. It is interestingly different from other build systems in the sense that it defines dependencies in the opposite direction (from source file to product, not the other way around). It is incredibly fast and simple. [0]: http://gittup.org/tup/

I did not know about tup. It looks excellent. Time to try some experiments...

Re: Qake: GNU Make-based build system with a different approach

#22
This is similar to what I wrote at work on and off over the last couple of months, replacing a build system using recursive Makefiles. Due to the way our product is composed I ended up adding support for building static libraries, programs, RPMs and documentation. With full support for dependencies, meaning if a source for a library is changed, the library will be rebuilt, programs that links against it will be re-linked, if the program is part of a RPM it will be rebuilt etc. Documentation will also be rebuilt if source embeds documentation. Another great bonus is of course that with one GNU Make instance and proper modeling of dependencies "make -j" works great, every time. I guess we have a couple of hundred source source files and "make -j" will happily start compiling them all. Read Peter Millers paper about recursive Makefiles about why the above is preferred.

Makefiles are of course a bit limited compared to shell scripts, but you can do a lot with implicit rules, static pattern rules, second expansion, call and eval, etc.

Re: Qake: GNU Make-based build system with a different approach

#23
post #3

Goal The user is supposed to be never needing to call clean goal. Does this track build tools also? If you upgrade a compiler and some intermediate binary format changes, will it automatically clean up those stale files?

Currently not. I imagine how this could be done, but it's quite a portion of work.

Re: Qake: GNU Make-based build system with a different approach

#25

I've always wondered why rake isn't more popular. It's very make-like and simple, but with the advantage of a fully-featured scripting language. https://github.com/ruby/rake

In some environments, even upgrading Make to a newer version is a hassle. Let alone installing some different tool.

Re: Qake: GNU Make-based build system with a different approach

#26

This is similar to what I wrote at work on and off over the last couple of months, replacing a build system using recursive Makefiles. Due to the way our product is composed I ended up adding support for building static libraries, programs, RPMs and documentation. With full support for dependencies, meaning if a source for a library is changed, the library will be rebuilt, programs that links against it will be re-li…

I ended up using $(eval ...) a lot, and turns out Make's support for it is... suboptimal.

As for paper - I believe it's "Recursive Make Considered Harmful" - I read it, it's great. Was one of the main motivators during build system rewrite.

Re: Qake: GNU Make-based build system with a different approach

#27
post #4

I've always wondered why Shake[0] wasn't more popular. Anyone not like Shake or know why others don't, or is this just a case of not being known? 0: https://github.com/ndmitchell/shake

For me, it always was more about infrastructure - successfully distributing a project when it's built with something less-than-mainstream is a problem, even if majority of install base is Ubuntu systems.

In this particular case, we would need to either build GHC from source for every user, or provide a binary compiled version for every Ubuntu version to keep providing source-level access to build system.

Re: Qake: GNU Make-based build system with a different approach

#28

This is similar to what I wrote at work on and off over the last couple of months, replacing a build system using recursive Makefiles. Due to the way our product is composed I ended up adding support for building static libraries, programs, RPMs and documentation. With full support for dependencies, meaning if a source for a library is changed, the library will be rebuilt, programs that links against it will be re-li…

I ended up using $(eval ...) a lot, and turns out Make's support for it is... suboptimal. As for paper - I believe it's "Recursive Make Considered Harmful" - I read it, it's great. Was one of the main motivators during build system rewrite.

Three or four levels down in $(eval ...) and $(call ...) still makes me stop and think how many $ I should have.

Yes, that's the paper, I was also heavily motivated by it. And when I read JDK also switched[1] to something similar, it just cemented my belief it was the right way to go, for the same reasons as for them.

[1] - http://openjdk.java.net/jeps/138

Re: Qake: GNU Make-based build system with a different approach

#30

I'm finding that for compiling code usually it is the configuration that makes life hard rather than the build system part. I've been using cmake [1] which makes the rules to build object files, libraries, executables pretty simple although determining and adapting to the eccentricities of any arbitrary system's environment is painful. I am also liking snakemake[2] these days for running arbitrary chains of jobs that…

Yeah, previously we had a no-configure setup (just a configuration file). I have some thoughts on how this could be implemented in Qake properly, but didn't get to it yet.
Post reply on HN