Implicit assumptions in Images.gmk: find errors
Erik Joelsson
erik.joelsson at oracle.com
Fri Nov 23 00:20:30 PST 2012
We could condition these finds on the existence of these directories. I
think that would be the cleanest implementation as it would logically
act the same as now, just with less noise and execs.
/Erik
On 2012-11-23 01:19, David Holmes wrote:
> Some of the constructs in Images.gmk implicitly assume that you are
> always building a JDK image and a JRE image. Ie.:
>
> JDK_DEMO_TARGETS := $(patsubst
> $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\
> $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \(
> -name "_the*" -o -name "javac_state" \) ))
>
> and:
>
> # /sample dir
> $(foreach f,$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f),\
> $(eval $(call
> AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS)))
>
>
> will both attempt to issue "find" in a directory that may not exist
> (jdk/demo and jdk/sample respectively) if you are not building a jdk
> image.
>
> Fortunately (or perhaps erroneously?) these find failures do not cause
> make to fail, they just generate noisy output (which of course is how
> I noticed it).
>
> Not sure what the solution is or if it is just something we have to
> live with. There is an awful lot of setup needed to build images, but
> some of it is dependent on what image has been requested.
>
> Cheers,
> David
More information about the build-infra-dev
mailing list