On Wed, 2005-01-12 at 11:23, Dill, John wrote: > That is cool. I was able to get a couple of functions working, but > what about global variables. Is expand only 1 or 0? If I wanted to > define semantics for $(true) and $(false) to expand to "true" and "" > for example, is that a easy task as well? Also, what is the rule of > thumb if encoding functions which expect a certain format, like > numbers for instance.
I think the best thing for you to do is to sit down and read a bunch of the GNU Make source code. Here's a rough outline to get you going: default.c The default variables and rules expand.c Expression and variable expansion function.c The built-in functions like $(strip) read.c Makefile parsing variable.c Variable handling > Do you maintain your own special version of make with your own > additions? No and I wouldn't encourage someone to go down this path unless they really have to. Most times I've been able to do everything I want within GNU Make's own language and the times I haven't I've used a quick $(shell) with utility programs like sed, awk, etc. > I'm not really sure which way to go. I don't know which things are in > the spirit of make, and whether or not some other development effort > is being done to address some of these types of things. Well, I'm not officially involved in GNU Make at all. I happen to use it a lot and wrote an emulator for GNU Make in my "day job", so I can't answer those questions. I guess that if you have specific functions you think need adding you could propose them here, or write a patch. Whatever you do talk to Paul Smith, he maintains GNU Make and knows what's going on. John. -- John Graham-Cumming Home: http://www.jgc.org/ Work: http://www.electric-cloud.com/ POPFile: http://getpopfile.org/ _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
