Re: [dev] slconfigure

From: <sylvain.bertrand_AT_gmail.com>
Date: Tue, 30 May 2017 07:07:30 +0000

On Mon, May 29, 2017 at 10:56:57PM +0200, Josuah Demangeon wrote:
> I am not disappointed when I see a simple ./configure script that generate a clean config.mk. Would something like this be acceptable to for a suckless project ?
>
> case "$(uname -a)" in
> *Linux* )
> XXXINC=/...
> ;;
> *OpenBSD* )
> XXXINC=/...
> ;;
> *FreeBSD* )
> XXXINC=/...
> ;;
> esac
>
> tee config.mk << EOF
> XXXINC = $XXXINC
> EOF
>
> I just read this post about portability:
> http://nullprogram.com/blog/2017/03/30/
> "How to Write Portable C Without Complicating Your Build"

The GNU autotools (and its friends) showed us that factorization can lead to
"over too much" and insane (once seen in the corporate world, now hurting open
source hard).

Sometimes the right trade off/balance, it's to go the orthonality way.

_For instance_, totally assume some duplicate and redondant code that between
platform specific makefiles. You could factorize at a lesser level with some
common bits with the include GNU makefile extension :(

In my case, I go basic shell, no dependency tracking on "work-in-progress" code
or small code (namely I don't bother with makefiles). On medium sized project,
I prefer "commenting out" in a brutal and idiot shell script, for the time
being.

-- 
Sylvain
Received on Tue May 30 2017 - 09:07:30 CEST

This archive was generated by hypermail 2.3.0 : Tue May 30 2017 - 09:12:13 CEST