|
|
Log in / Subscribe / Register

The eudev project launches

The eudev project launches

Posted Dec 20, 2012 4:14 UTC (Thu) by nevets (subscriber, #11875)
In reply to: The eudev project launches by mezcalero
Parent article: The eudev project launches

> And you know if you then try to accommodate of making all these things optional and selectable specifically at configure time then you necessarily end up with a makefile where every second line is ifdef'ed in by a different configure switch, and even the .c sources are littered with #ifdef HAVE_xxx sections. And that is a) very hard to read and maintain, b) impossible to test in all combinations (explodes the test matrix...)

Maybe you should have a look at the Linux kernel. It's probably the most configurable project that ever existed. The kernel has matured where we don't have lots of #ifdef HAVE_xxx in the .c sources. We do put them into the .h files, where a static inline may act differently depending on the configs set. It's actually quite an elegant solution.

I based my Makefile for trace-cmd and kernelshark partially off of the Linux kbuild system. It's much more versatile and easier to understand than autoconf. I should work on making the kbuild system available for other projects as well. Package it up and reuse it.

Yes, we don't test all the different config options either, but you test what you ship. If someone finds a set of options that break, it's not that difficult (or time consuming) to fix it. I know this from experience as well.

I left off 'c)' because it was entirely an opinion, and not a technical issue at all.


to post comments

The eudev project launches

Posted Dec 21, 2012 7:35 UTC (Fri) by felipec (guest, #75494) [Link]

Completely true, in fact, there are other projects using Linux's kbuild system; buildroot.

The only way to make a software project work for everyone, is to allow configuration options for everyone. If you don't, for laziness, or whatever reason; forks are bound to happen, as eudev demonstrates.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds