Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2004-05-24 15:08:48 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2004-05-24 15:08:48 +0400
commit352694210fa1faad428bf41ef27a018c4daa0dfc (patch)
tree5ffb99a7f35b118de261dc004809cc1dc251818e /configure.in
parentc580d51621dc3fee84db019342cc973f0f3e542c (diff)
2005-05-24 Paolo Bonzini <bonzini@gnu.org>
* 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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index c4c7fad5d..42f7beacc 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,