On Thu, 26 Apr 2001, David Bailey wrote:

[...touching files all over the place...]

> Then of course I had to touch the corresponding *.h files in sigc++ again.

This is a very weird situation to be in.
My makefile knowledge isn't terrific but it'd be nice to be able to
specify what header files the %.h rule applies to.  Or at least which ones
it doesn't apply to.

This last gives me an idea that we might be able to just specify empty
rules header files that aren't generated.  Something like:

acconfig.h:

just before the %.h rule may stop make attempting to rebuild acconfig.h.
However I think we might be able to do something like:

first_bit = $(patsubst %.h,%.%,$(BUILT_SOURCES) $(CONFIG_HEADER))
unbuilt = $(filter-out $(first_bit), *.h)
$(unbuilt):

just before the %.h rule.  However, this doesn't work.  The filter-out
function just doesn't filter out anything.  I've tried:

unbuilt = $(filter-out $(BUILT_SOURCES), *.h)

but that does nothing.  I thought maybe it really did need a pattern with
a % sign in it and so I wrote the patsubst to get something that would
match but it seems filter-out just ignores that also.  $(unbuilt) is
always equal to the full listing of header files. Any make gurus out there
that can help?

I also tried changing the %.h rule into:

$(BUILT_SOURCES): macros/$@.m4 ...

but the $@ just returns an empty string when used here.  I've tried ()
around different bits but that doesn't help either. Again I'll ask any
make gurus to step forward.


So fancy solutions aside we just need to define unbuilt explicitly like:

unbuilt = acconfig.h adaptor.h handle.h handle_system.h marshal.h \
        object.h scope.h signal_system.h thread.h type.h
$(unbuilt):
        @echo "$@ is not regeneratable.  Reinstall the sources."

So, David, can you try adding these four lines to your Makefile.am just
before the %.h rule.  It should work for you.  It has no significant
effect for me using gmake unless I actually remove an unbuilt file.


> Guess what? It still does not quite make it. Now I get:
> mips-tfile, /tmp/ccfdyYIV.s:455 String too big (4161 bytes)
> #.stabs "1956=##1878;:t8_Rb_tree5Zt12basic_string3ZcZt18string_char ...

This one we have seen on other systems from time to time.  One way to get
around this is to run configure with the --with-included-string option.

Allan. (ARRae)


Reply via email to