RFR: JDK-8073634: Improve clean targets
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Apr 7 11:26:00 UTC 2015
On 2015-04-02 15:05, Erik Joelsson wrote:
> Our top level clean targets need some improvement.
> * There is no clean-docs
> * dist-clean does not remove everything configure creates on all
> For the latter, moving a lot of the files generated by configure into
> a separate sub dir of the output dir helped. It's named
> configure-support as to mirror make-support. The difference between
> the two is who is responsible for the files inside them and thus which
> target will clean them.
> I also made the clean targets work better with LOG=debug, so you can
> actually see the rm commands.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8073634
> Webrev: http://cr.openjdk.java.net/~erikj/8073634/webrev.01/
In general it looks good. I have a couple of remarks, though.
1) In Clean-docs, you do:
+ $(RM) -r $(SUPPORT_OUTPUTDIR)/docs
+ $(RM) -r $(IMAGES_OUTPUTDIR)/docs
I'm not quite certain cleaning images/docs the right thing to do. For
all other clean targets, we only clean the support part. If we want to
clean images, we run clean-images. And if you think this is the right
thing to do for images, wouldn't it then also be the right thing for
e.g. java.base-native? And then things quickly become complicated.
2) The new configure-support, as well as the rather new make-support
seems to be a bit unfairly treated. There is a MAKESUPPORT_OUTPUTDIR in
spec.gmk but it's hardcoded there, so you can't use it in configure,
e.g. in your changes in build-performance.m4. The new configure-support
does not even have a corresponding CONFIGURESUPPORT_OUTPUTDIR in the
spec.gmk. Instead, it has a variable CONFIGURE_SUPPORT that is present
only in the configure files.
I'm not sure how much, if anything, of these inconsistencies that should
be fixed now. But I'd suggest that you rename CONFIGURE_SUPPORT to
CONFIGURESUPPORT_OUTPUTDIR at the very least. (Or, maybe,
MAKESUPPORT_OUTPUTDIR should be MAKE_SUPPORT_OUTPUTDIR.)
More information about the build-dev