This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: in-tree build (PR 3281)


I'm checking this in on both the trunk and the branch.

This fixes PR bootstrap/3281.  It allows `make install' to work
correctly when an in-tree build is done.

I tested this by building and installing from scratch, both in-tree
and in a separate build tree, on my x86 Red Hat Linux 6.2 box.

Tom

Index: boehm-gc/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* aclocal.m4, configure, Makefile.in: Rebuilt.
	* acinclude.m4: Set mkinstalldirs for in-tree build.

Index: boehm-gc/acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/acinclude.m4,v
retrieving revision 1.10.4.2
diff -u -r1.10.4.2 acinclude.m4
--- boehm-gc/acinclude.m4 2001/06/13 16:32:01 1.10.4.2
+++ boehm-gc/acinclude.m4 2001/07/03 18:27:10
@@ -37,6 +37,10 @@
 
 AC_CANONICAL_SYSTEM
 
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
 AM_INIT_AUTOMAKE(boehm-gc, 5.1, no-define)
 
 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
Index: zlib/ChangeLog.gcj
from  Tom Tromey  <tromey@redhat.com>

	* configure, Makefile.in: Rebuilt.
	* configure.in: Set mkinstalldirs, for in-tree build.

Index: zlib/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/zlib/configure.in,v
retrieving revision 1.9.4.1
diff -u -r1.9.4.1 configure.in
--- zlib/configure.in 2001/05/13 22:32:56 1.9.4.1
+++ zlib/configure.in 2001/07/03 18:27:16
@@ -24,6 +24,11 @@
 fi
 
 AC_CANONICAL_SYSTEM
+
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
 AM_INIT_AUTOMAKE(zlib, 1.1.3)
 
 AM_MAINTAINER_MODE
Index: libjava/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* aclocal.m4, configure: Rebuilt.
	* acinclude.m4 (LIBGCJ_CONFIGURE): Don't set libgcj_flagbasedir.
	Correctly compute libgcj_basedir.
	(mkinstalldirs): Define and subst.

Index: libjava/acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/acinclude.m4,v
retrieving revision 1.7.4.2
diff -u -r1.7.4.2 acinclude.m4
--- libjava/acinclude.m4 2001/06/13 16:35:06 1.7.4.2
+++ libjava/acinclude.m4 2001/07/03 18:27:23
@@ -12,23 +12,39 @@
 dnl We may get other options which we dont document:
 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
 
-if test "[$]{srcdir}" = "."; then
-  if test "[$]{with_target_subdir}" != "."; then
-    libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
+# When building with srcdir == objdir, links to the source files will
+# be created in directories within the target_subdir.  We have to
+# adjust toplevel_srcdir accordingly, so that configure finds
+# install-sh and other auxiliary files that live in the top-level
+# source directory.
+if test "${srcdir}" = "."; then
+  if test -z "${with_target_subdir}"; then
+    toprel=".."
   else
-    libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
+    if test "${with_target_subdir}" != "."; then
+      toprel="${with_multisrctop}../.."
+    else
+      toprel="${with_multisrctop}.."
+    fi
   fi
 else
-  libgcj_basedir="[$]{srcdir}/$1"
+  toprel=".."
 fi
+
+libgcj_basedir=$srcdir/$toprel/$1/libjava
 AC_SUBST(libgcj_basedir)
-AC_CONFIG_AUX_DIR($libgcj_basedir/..)
+
+AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
 if :; then :; else
   # This overrides the previous occurrence for automake, but not for
   # autoconf, which is exactly what we want.
   AC_CONFIG_AUX_DIR(..)
 fi
 
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
 AC_CANONICAL_SYSTEM
 
 dnl This shouldn't be needed, as long as top-level dependencies are
@@ -80,11 +96,6 @@
 libgcj_javaflags=
 
 . [$]{srcdir}/configure.host
-
-case [$]{libgcj_basedir} in
-/* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{libgcj_basedir} ;;
-*) libgcj_flagbasedir='[$](top_builddir)/'[$]{libgcj_basedir} ;;
-esac
 
 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
Index: libjava/libltdl/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuilt.
	* configure.in: Added aux-dir hacks to satisfy automake and
	in-tree builds.

Index: libjava/libltdl/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/libltdl/configure.in,v
retrieving revision 1.3
diff -u -r1.3 configure.in
--- libjava/libltdl/configure.in 2000/09/10 08:04:40 1.3
+++ libjava/libltdl/configure.in 2001/07/03 18:27:33
@@ -2,12 +2,16 @@
 
 AC_INIT(ltdl.c)
 
-dnl We shouldn't be using these internal macros of autoconf,
-dnl but CONFIG_AUX_DIR($with_auxdir) breaks automake.
 AC_ARG_WITH(auxdir,
 [  --with-auxdir=DIR   path to autoconf auxiliary files],
-[AC_CONFIG_AUX_DIRS($with_auxdir)],
+[AC_CONFIG_AUX_DIR($with_auxdir)
+dnl This is here just to satisfy automake.
+ifelse(not,equal,[AC_CONFIG_AUX_DIR(../..)])],
 [AC_CONFIG_AUX_DIR_DEFAULT])
+
+# This is another blatant hack to work around automake bugs.
+mkinstalldirs="$ac_aux_dir/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
 
 if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
   if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]