@if [ !-f foo.make ] ; then \
echo "foo.make cannot be found"; \
Just a thought. Defining a rule should get rid of the implicit search.
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:
> $(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?