Implicit assumptions in Images.gmk: find errors

David Holmes david.holmes at oracle.com
Thu Nov 22 16:19:36 PST 2012


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