From dfdffa2c3c2df36aa57d5beee75ca3fb15e3a736 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 24 May 2004 11:08:48 +0000 Subject: 2005-05-24 Paolo Bonzini * configure.in: Test the ability to symlink directories. * configure: Regenerate. * Makefile.def (bootstrap-stage): New definitions. * Makefile.tpl (configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc, all-stage1-gcc, all-stage2-gcc, all-stage3-gcc, new-bootstrap, new-cleanstrap, new-restage1, new-restage2, new-restage3, compare): Autogenerate, see Makefile.in entry for behavioral changes. (distclean-stage1, new-stage1-start, new-stage1-end, new-stage1-bubble, distclean-stage2, new-stage2-start, new-stage2-end, new-stage2-bubble, distclean-stage3, new-stage3-start, new-stage3-end): New autogenerated targets. (objext, prebootstrap, BOOT_CFLAGS, POSTSTAGE1_FLAGS_TO_PASS): Move above the autogenerated targets. * Makefile.in: Regenerate. (distclean-stage1, new-stage1-start, new-stage1-end, new-stage1-bubble, distclean-stage2, new-stage2-start, new-stage2-end, new-stage2-bubble, distclean-stage3, new-stage3-start, new-stage3-end): New targets. (all-stage1-gcc): Move prebootstrap dependency from here... (configure-stage1-gcc): ...to here. (new-bootstrap): Use bubble targets. (new-cleanstrap, new-restage1, new-restage2, new-restage3): Use per-stage distclean targets. (configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc, all-stage1-gcc, all-stage2-gcc, all-stage3-gcc, new-bootstrap): Use new-stageN-start to prepare the tree. --- configure.in | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index c4c7fad..42f7bea 100644 --- a/configure.in +++ b/configure.in @@ -25,6 +25,7 @@ AC_ARG_PROGRAM # Get 'install' or 'install-sh' and its variants. AC_PROG_INSTALL +AC_PROG_LN_S sinclude(config/acx.m4) @@ -2247,6 +2248,36 @@ case $build in esac AC_SUBST(stage1_cflags) +# It makes debugging easier if we create as symlinks the stage directories +# gcc for stageN-gcc and stage-prev for stage(N-1). In case this is not +# possible, however, we can resort to mv. +AC_CACHE_CHECK([if symbolic links between directories work], +[gcc_cv_prog_ln_s_dir], +[if test "${LN_S}" = "ln -s" \ + && mkdir confdir.s1 \ + && ln -s confdir.s1 confdir.s2 \ + && echo timestamp1 > confdir.s1/conftest.1 \ + && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \ + && echo timestamp2 > confdir.s2/conftest.2 \ + && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \ + && rm -f confdir.s2; then + gcc_cv_prog_ln_s_dir=yes +else + gcc_cv_prog_ln_s_dir=yes +fi +rm -rf confdir.s1 confdir.s2]) + +case ${gcc_cv_prog_ln_s_dir} in + yes) + CREATE_LINK_TO_DIR='ln -s $$1 $$2' + UNDO_LINK_TO_DIR='rm -f $$1' ;; + *) + CREATE_LINK_TO_DIR='mv $$1 $$2' + UNDO_LINK_TO_DIR='mv $$1 $$2' ;; +esac +AC_SUBST(CREATE_LINK_TO_DIR) +AC_SUBST(UNDO_LINK_TO_DIR) + # Enable -Werror in bootstrap stage2 and later. # Change the default to "no" on release branches. AC_ARG_ENABLE(werror, -- cgit v1.1