Hacker News new | ask | show | jobs
by jandrese 1778 days ago
My favorite thing to see when I download a project is a build system that consists of a single 6 line Makefile. Granted this usually means the project only has a handful of files to manage and it does run out of headroom as the project becomes more complex, but those build systems always work on the first try and finish quickly.

Sure it means I would run into complications on a 30 year old AIX system with some old defunct C compiler, but that's a tradeoff I'm willing to make to simplify the build process.

3 comments

I recently came across a project with no external build system at all. Just a perl script which mimicked enough of the functionality of a build tool to get the job done. Basically "which files need rebuilding, just rebuild those". It's actually rather trivial when you look into it. Plus Makefile syntax is so bad it actually makes perl look like a hot new language.
That works fine if you’re only building for Linux. If, however, you want to run on BSD, you need something like autotools.
A short Makefile means you aren't leaning on OS specific quirks and you have a short dependency list. It usually compiles on BSD just fine.

If you aren't including headers from the "linux" directory a BSD system is almost identical to a Linux system as far as C is concerned. Common libraries like OpenSSL, zlib, libpng, and so forth are identical as well. pkg-config exists on modern BSD systems and takes a lot of the guesswork out of dependencies.

As someone who used FreeBSD and Interix/SFU/SUA for a while, those were always the projects I hated the most. Just get over yourself and use autotools. Sure, your build will be a little slower, but guess what: it works.