On Nov 15, 2012, at 5:53 PM, Reyk Floeter <r...@openbsd.org> wrote:

> On Thu, Nov 15, 2012 at 5:11 PM, Marc Espie <es...@nerim.net> wrote:
>> external people regularly ask "but why you don't want  to use GNU/m4 GNU/make
>> GNU/whatever ?"
> External people seem to ask weird questions.
> I just had to dig into autoconf/auto* because it seems to be a "must
> have" for a "portable" project. Yuck! It is a reason why I don't
> understand and at the same time deeply respect our ports people: they
> have to mess with this stuff all the time!

The amount of hardcoding in Makefiles for GNU make is astounding given the
(flexible enough) design of GNU make. It's not as good as it could be, but
there are so many blunt tutorials and documentations available. They all fail
to use the tricks that have been used by BSDs for ages. It's always hardcoding
this, explicitly calling that...

It's not surprising that so many auto* and other magical make systems have been
build on top of that rocky foundation.

I've tried to work on a GNU compatible prog.mk and the like, but they are barely
in shape: https://github.com/fichtner/peak/blob/master/prog.mk

And then you still have to deal with differences in include syntax and bugs like
not handling paths in multiple layers of include files correctly.

> For all the GNU people, here is how a Makefile for hello.c should look like:
> PROG= hello
> NOMAN= yes
> .include <bsd.prog.mk>
> Yes, you're supposed to provide a man page hello.1 and remove the NOMAN line 
> :)
> Reyk
>> Well, latest one, turns out gnu-m4 has reaaaally sloppy regexp handling.
>> Namely, stuff like
>> regexp(`n', `?')
>> *works* with gm4...
>> I know somewhat incredible...  our regexpes obviously will not like ? like
>> that, since it's not a normal character, and gnu regexp handling is such
>> a bluberring piece of code that it works... very reproducible, very so 
>> secure.
>> Reminds me of gnu libtool dropping silently stuff it doesn't understand...
>> oh wait, of course, *that* regexp is in the autoconf much leading to
>> gnu libtool.
>> Gee, what a surprise...

Reply via email to