help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea: GNU Make Standard Library


From: Dill, John
Subject: Re: Idea: GNU Make Standard Library
Date: Tue, 18 Jan 2005 08:30:02 -0600

>It suddenly occurred to me that it might be nice to have a standard
>library of GNU Make functions that Makefile writes could 'include'.   I
>could imagine something like 'include gmsl.mak' which would then define
>a bunch of functions to arithmetic, list manipulation, string functions,
>...
>
>Anyone think this is a good idea?  If so, I'll consider registering a
>SourceForge or Savannah project for this and maintain it.  I could
>implement quite a bit of this and release it under the GPL.

It's something that I thought about and would like to see, as I think it would 
allow much greater flexibility and power of the make system.  There are a 
couple of questions.

Who would be involved in making a function 'standard'?  If we've decided to 
make a function standard, should it just be coded directly into the gmake 
source?  I would be annoyed with having to use $(call ...) to call a standard 
function.

>From reading the docs I gathered that make isn't meant to reimplement the 
>wheel and thus provide all the power of some of the other gnu programs like 
>sed.  So what would be the scope of a make standard library?

We could introduce some functionality that we would like to add to the make 
system, and see how people respond to it before making it 'standard'.  I use 
some of my freetime to try to provide a framework to perform your own 
configuration tests similar to autoconf, and a simple unit test framework for 
multi-platform development using make.

There are also some simple utilities which are an annoyance to code and 
workaround and feel like they are simple and useful enough that they should be 
in make.  One common example is lastword.  Another is where I want to 
communicate something to the user, so I have

message=$(shell $(ECHO) '$1' $(stdout)>&$(stderr))

as I find it annoying to use $(warning ...) which prints out other stuff I 
don't need.  This functionality can easily be encoded into the make source, but 
would we want to?  I don't think I have enough history with make to be able to 
answer this question.

I don't know how this would fit in with make using guile, and I don't think 
I've had an explanation of what guile will do for make.

I would be interested in contributing to such a project, although I am pretty 
crunched for time for the next 2-3 months.

John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]