RFR: JDK-8034199 Add 'reconfigure' target for re-creating a configuration

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Mon Feb 17 14:04:36 UTC 2014

On 2014-02-17 03:10, David Holmes wrote:
> Presumably the right way to do this would be:
> "make clean reconfigure ..."
> otherwise you could get some kind of weird hybrid build. I'm not sure 
> that every change in spec.gmk, for example would force a recompile of 
> everything that depended on something in there. But perhaps it does?

I agree. The only way we can guarantee a correct build after a 
configuration change is to clean the build.

Unfortunately, this seems a bit harsh, since most of the time a complete 
rebuild is not needed.

Ideally, we would of course be able to detect exactly what needs to be 
rebuilt as a result of creating a new configuration in place with 
different arguments, or by re-creating the same configuration due to an 
update of the configuration script. In practice, that's hardly doable. :-(

The compromise we have chosen is to:
1) check in make if the configure script has been updated since spec.gmk 
was generated. If so, abort and request a reconfiguration. (Which will 
be helped by the current patch.)
2) check in configure if there are an existing configuration in place. 
This can be the case either due to the user creating a new configuration 
with different arguments (or on a different platform using a network 
share etc), or due to a recreation of the original configuration, 
perhaps as prompted to by case 1. For this, we only generates a warning 
(saying that it is recommended that you run "make clean").

We could get harder about the sloppiness in step 2, and force a make 
clean, but I haven't heard many complaints about incorrect build results 
due to such changes, but I'm sure we'd hear complaints about too 
frequent updates to the configure files if we were to enforce a clean! :-)

> Sometimes I've re-run configure with the exact same args and I get a 
> warning about doing this over an existing configuration ?? At which 
> point I either do a dist-clean or "rm -rf ...".

You'll get this warning everytime you run configure where a spec.gmk 
already exists. If you have not noticed it always, it is because you are 
like everyone else and do not read configure warnings. ;-)


More information about the build-dev mailing list