Build systems - Programming On Unix

Users browsing this thread: 3 Guest(s)
z3bra
Grey Hair Nixers
Hey nixers!

I figured we never really talked about build systems in there, even though it is quite essential for any programming project, which one do you use and/or like, and why?

here is my personnal list:

make
The one I use, yet not my preferred one. Makefile are known by most programmers, packagers, and is well defined and documented. It allow compiling programs in any language quite easily, and even more.

But make has (too?) many implementations, each using not standard tricks that are not cross platform, and that make the compilation process tedious in some cases (eg, from linux to bsd). Also, one of its major advantage, implicit rules, is also one of its major disadvantage, as it can.lead to unexpected behaviors. The macro expansion is also pretty weird in make, leading to a few headaches if you don't wrap your head around that.

mk
The plan 9 build system. Everything make has, but with predictability! The syntax is quite similar to make's, except that nothing is implicit, and recipes are passed "as is" to the underlying shell. All variables are passed/acquired from the environment, which is a nice plus.
Currently my preferred build system (but I still provide makefiles, for accessibility). If you're curious, here is a project that has both a makefile and an mkfile: http://git.z3bra.org/sick/files.html

redo
Something I'd like to try, as it sounds great, but that is quite different from what everyone is used to. It is based on recursivity, and this paper will explain how it works better than me: http://cr.yp.to/redo.html
BANGARANG, MOTHERFUCKER
jkl
Long time nixers
I started to use CMake and Bakefile for my newer projects. Working with very different operating systems (I usually use my own software on both Windows desktops and *BSD servers where applicable) makes it notably harder to find a consensus build system so I'll just generate the appropriate Makefiles when I need them.

--
<mort> choosing a terrible license just to be spiteful towards others is possibly the most tux0r thing I've ever seen
z3bra
Grey Hair Nixers
My problem with CMake, autotools &co. is that they will most of the time test useless thing, and can fail a build for no particular reason.
I've had a build fail because the sed version I used "presumably" faileto handle "long lines". In this case "long" was of perfectly arbitrary length, and by testing it by hand, it worked like a charm. The issue was that the configure script was using a GNU/sed specific flag for this test.
I've been working with many of these autotools-based software recently when working on making my own distro, and most of the time, they harm more than they help when you get out of the all-gnu path.
evbo
Members
I use make because it's the standard and it's what I know. I know that's a boring answer, but it's probably the most common one.

On a side note: z3bra, what are you using to run your git web frontend? It looks really nice and clean.
z3bra
Grey Hair Nixers
It is stagit
evbo
Members
Thank you z3bra, I may give it a try.
z3bra
Grey Hair Nixers
note: I just released they realised stagit-gopher!
pranomostro
Long time nixers
Ah yes, make, mk and redo. I would throw in tup for a good measure (http://gittup.org/tup/).

What really bugs me about make is that I grew into using GNU specific features, and that it
is really hard to find a good overview of what is GNU specific and what is specified in the standard.
I have now managed to escape that, using POSIX-make templates.
Also, most people just use the GNU extensions, which forces people using another make to basically
rewrite their makefiles.

There is also mbld, the build system for the myrddin programming language (https://github.com/oridb/mc/tree/master/mbld), which is probably the most comfortable build system I have ever used, fitting in perfectly with myrddin (eliminating most special compilation patterns).

Also, does somebody here know how to assign a default recipe to all rules? I have a makefile
for installing my dotfiles, but I have found no more elegant way than to repeat `ln $? $@` for each
rule (https://github.com/pranomostro/dots/blob...r/makefile). I wouldn't believe if there wasn't
a much more elegant way to do that with make (and I don't really want to use any specialized software
for installing my dotfiles).
z3bra
Grey Hair Nixers
If I remember correctly, tup is that build system which will spawn a daemon process to build your project faster. That's a tradeoff I'm not ready to accept for a build system...

Never heard about mbld; and to be honest, it doesn't sound sexy at all. There is no doc in the link you posted; and it seems ultra-specific as well (written/parsed in myrddin, to compile myrddin).

As for your problem, I tried thinking about it and must admit that I couldn't think of anything (which definitely shows the limitations of make(1)).