[PATCH FOR REVIEW]: Unset JAVA_HOME and JDK_HOME prior to building OpenJDK
Mark Wielaard
mark at klomp.org
Tue Aug 25 06:54:23 PDT 2009
On Tue, 2009-08-25 at 09:29 -0400, Lillian Angel wrote:
> Andrew John Hughes wrote:
> > This simple patch for IcedTea6 unsets JAVA_HOME and JDK_HOME before
> > starting an OpenJDK build. If JAVA_HOME is set, an OpenJDK build will
> > fail.
> >
> > Ok to commit?
> >
> > ChangeLog:
> >
> > 2009-08-25 Andrew John Hughes <ahughes at redhat.com>
> >
> > * Makefile.am:
> > Unset JAVA_HOME and JDK_HOME before building.
>
> I am not thrilled with the idea of unsetting env vars on a system. I
> think maybe it would be better for configure to fail and give an error
> message if either of these are set.
Why does the build fail if any of these are set in the first place?
I agree that in general it is better to have configure figure out
settings. That is really what it is for.
The GNU Make manual actually warns not to rely on environment variables:
It is not wise for makefiles to depend for their functioning on
environment variables set up outside their control, since this
would cause different users to get different results from the
same makefile. This is against the whole purpose of most
makefiles.
http://www.gnu.org/software/automake/manual/make/Environment.html
Cheers,
Mark
More information about the distro-pkg-dev
mailing list