> I like the idea to have METADATA files (actually, I have been using a build 
> system for the last couple of years which used a similar thing, except that 
> the 
> metadata files were actually make includes).

Working on the postgres Makefile, I realize that it would be handy indeed to 
have METADATA files as make includes. We could get cleaner Makefiles. I 
particularly like the idea used by other build systems to use dynamic variable 
names, which allows to ask questions like "which version is PROGRAM XXX". 
Unfortunately, the method I know does not work with Sun make:

haggis:/tmp/test$ cat metadata_sample.inc
PROGRAM                 := postgres
$(PROGRAM).majver       := 8.3
$(PROGRAM).minver       := 3
$(PROGRAM).version      := $($(PROGRAM).majver).$($(PROGRAM).minver)
VER                     := $(PROGRAM)-$($(PROGRAM).version)

all:
        (echo $(VER))

haggis:/tmp/test$ gmake -f metadata_sample.inc
(echo postgres-8.3.3)
postgres-8.3.3
haggis:/tmp/test$ make -f metadata_sample.inc
make: Fatal error in reader: metadata_sample.inc, line 2: Unexpected end of 
line 
seen
Current working directory /tmp/test

Does anyone know how to make this work with Sun make or is there any chance we 
could switch over to gnu make, at least for SFW?

I am sure this would allow for a much more versatile structure along the lines 
of what has already been started using METADATA files.

Nils

Reply via email to