On 16/06/2012 10:33 AM, Kelly O'Hair wrote:
foo.make:
@if [ !-f foo.make ] ; then \
echo "foo.make cannot be found"; \
fi
-include foo.make
Just a thought. Defining a rule should get rid of the implicit search.
Yeah, that's pretty ugly though and noisy. Seems silly to me that
-include actually attempts to build the missing file when the -
indicates it isn't always expected to be there. Should be a simple way
to say "don't try to make it".
I would also hope that a simpler rule eg maybe:
%.make:
would disable the use of the implicit rules, without needing a per file
existence check.
Thanks,
David
-kto
On Jun 15, 2012, at 4:59 PM, David Holmes wrote:
Here's the situation. We add a -include for a possibly non-existent custom
makefile, eg foo.make. When the file isn't present the build tries to build the
precompiled headers - Huh! ???
This is due to the following:
1. If "-include foo.make" fails to find foo.make it tries to create it. For
this it runs through all the implicit rules and for example sees if it can create
foo.make.o, foo.make.c etc.
2. top.make defines the following implicit rule:
%.o %.i %.s:
$(UpdatePCH)
$(MAKE) -f vm.make $(MFLAGS) $@
#$(MAKE) -f vm.make $@
so this rule is executed to try and generate foo.make.o/i/s and so we try to
create the precompiled headers.
In a simple test it seemed that adding
.PHONY: foo.make
would fix the problem. But on the full hotspot build it didn't work. Still
investigating if we made a mistake somewhere in how we did this.
Other way to fix, I think, is to define some kind of rule for .make files so
that the implicit rules are no longer applied. I'm not sure how to do that
though.
Anyone have any suggestions?
Thanks,
David