axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [build-improvements] msys and double-colon


From: Gabriel Dos Reis
Subject: [Axiom-developer] [build-improvements] msys and double-colon
Date: 10 Apr 2007 10:54:51 -0500

Hi,

  With a recent version of msys (Windows XP), I'm seeing a surprising
behaviour where the '::' in boottran::boottoclc will be passed to the
Lisp image as a semicolon!  I don't know whether is GCL doign it or
msys, but I think it is msys.

  Another hunk of this patch concerns the use of "ln -s".  With
Autoconf-2.60 and later, Autoconf test all possible ways of using 
"ln -s" (between files, from files to directories, etc.) and if any of
those possibilities fails, Autoconf deduces that "ln -s" is unusable on
the platform, therefore default to "cp -p".  In the cases where we use 
"ln -s", it is for just creating a symlink to a directory (which works
on msys) and the fallback "cp -p" just does not work for that
situation!  So, I explicitly set LN_S to "ln -s" -- that is incorrect
for theoretical maximum portability, but from practical portability
point of view, it is OK.

Tested on an i686-pc-linux and i686-pc-mingw32.
Committed to build-improvements.

-- Gaby

2007-04-10  Gabriel Dos Reis  <address@hidden>

        * config/var-def.mk (LN_S): Override.
        * configure.ac.pamphlet (<<file utils>>): Comment out test for
        "ln -s".
        * configure.ac: Regenerate.
        * configure: Likewise.

src/scripts/ 
2007-04-10  Gabriel Dos Reis  <address@hidden>

        * document.in: Don't use full internal name of symbols in package
        boottran.  Push into that package first, and use short name.

*** config/var-def.mk   (revision 15445)
--- config/var-def.mk   (local)
*************** install_sh_script = $(install_sh) -c
*** 68,74 ****
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
! LN_S = @LN_S@
  mkinstalldirs = $(top_srcdir)/config/mkinstalldirs
  PATCH = @PATCH@
  RANLIB = @RANLIB@
--- 68,79 ----
  INSTALL_DATA = @INSTALL_DATA@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
! ## FIXME:  The test done with Autoconf-2.60 and later concludes
! ##         that "ln -s" is unusable on msys, and therefore defaults to
! ##         "cp -p", but that default is unusable for us.  For our
! ##         purpose "ln -s" is just fine on that platform.  Consequently
! ##         we are explicitly overrding that value here.
! LN_S = ln -s
  mkinstalldirs = $(top_srcdir)/config/mkinstalldirs
  PATCH = @PATCH@
  RANLIB = @RANLIB@
*** configure   (revision 15445)
--- configure   (local)
*************** axiom_cflags
*** 663,669 ****
  INSTALL_PROGRAM
  INSTALL_SCRIPT
  INSTALL_DATA
- LN_S
  TOUCH
  MKTEMP
  AWK
--- 663,668 ----
*************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR
*** 3143,3159 ****
  
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
! { echo "$as_me:$LINENO: checking whether ln -s works" >&5
! echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
! LN_S=$as_ln_s
! if test "$LN_S" = "ln -s"; then
!   { echo "$as_me:$LINENO: result: yes" >&5
! echo "${ECHO_T}yes" >&6; }
! else
!   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
! echo "${ECHO_T}no, using $LN_S" >&6; }
! fi
! 
  # Extract the first word of "touch", so it can be a program name with args.
  set dummy touch; ac_word=$2
  { echo "$as_me:$LINENO: checking for $ac_word" >&5
--- 3142,3148 ----
  
  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  
! # AC_PROG_LN_S
  # Extract the first word of "touch", so it can be a program name with args.
  set dummy touch; ac_word=$2
  { echo "$as_me:$LINENO: checking for $ac_word" >&5
*************** axiom_cflags!$axiom_cflags$ac_delim
*** 9364,9370 ****
  INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
  INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
  INSTALL_DATA!$INSTALL_DATA$ac_delim
- LN_S!$LN_S$ac_delim
  TOUCH!$TOUCH$ac_delim
  MKTEMP!$MKTEMP$ac_delim
  AWK!$AWK$ac_delim
--- 9353,9358 ----
*************** axiom_src_all!$axiom_src_all$ac_delim
*** 9398,9403 ****
--- 9386,9392 ----
  PLF!$PLF$ac_delim
  CCF!$CCF$ac_delim
  LDF!$LDF$ac_delim
+ LISP!$LISP$ac_delim
  _ACEOF
  
    if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
*************** _ACEOF
*** 9439,9451 ****
  ac_delim='%!_!# '
  for ac_last_try in false false false false false :; do
    cat >conf$$subs.sed <<_ACEOF
- LISP!$LISP$ac_delim
  GCLOPTS!$GCLOPTS$ac_delim
  LIBOBJS!$LIBOBJS$ac_delim
  LTLIBOBJS!$LTLIBOBJS$ac_delim
  _ACEOF
  
!   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then
      break
    elif $ac_last_try; then
      { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
--- 9428,9439 ----
  ac_delim='%!_!# '
  for ac_last_try in false false false false false :; do
    cat >conf$$subs.sed <<_ACEOF
  GCLOPTS!$GCLOPTS$ac_delim
  LIBOBJS!$LIBOBJS$ac_delim
  LTLIBOBJS!$LTLIBOBJS$ac_delim
  _ACEOF
  
!   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then
      break
    elif $ac_last_try; then
      { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
*** configure.ac        (revision 15445)
--- configure.ac        (local)
*************** AC_SUBST(axiom_cflags)
*** 64,70 ****
  AC_OBJEXT
  
  AC_PROG_INSTALL
! AC_PROG_LN_S
  AC_CHECK_PROG([TOUCH], [touch],
                [touch], [AC_MSG_ERROR(['touch' program is missing.])])
  AC_CHECK_PROGS([MKTEMP], [mktemp])
--- 64,70 ----
  AC_OBJEXT
  
  AC_PROG_INSTALL
! # AC_PROG_LN_S
  AC_CHECK_PROG([TOUCH], [touch],
                [touch], [AC_MSG_ERROR(['touch' program is missing.])])
  AC_CHECK_PROGS([MKTEMP], [mktemp])
*** configure.ac.pamphlet       (revision 15445)
--- configure.ac.pamphlet       (local)
*************** AC_OBJEXT
*** 603,612 ****
  
  \paragraph{File utils}
  Then, check for a usable [[install]] program.  Also, find out
! way to hard- or soft-link files.
  <<file utils>>=
  AC_PROG_INSTALL
! AC_PROG_LN_S
  AC_CHECK_PROG([TOUCH], [touch],
                [touch], [AC_MSG_ERROR(['touch' program is missing.])])
  AC_CHECK_PROGS([MKTEMP], [mktemp])
--- 603,622 ----
  
  \paragraph{File utils}
  Then, check for a usable [[install]] program.  Also, find out
! way to hard- or soft-link files.  
! 
! After a recent migration to
! \Tool{Autoconf-2.60}, it turns out that all possibilities of
! soft-linking are tried (to ``play safe''), and if any variation
! fails then, [[LN_S]] is defined to [[cp -p]], which works
! only for files as sources.  But, the only way we currently
! use [[LN_S]] is when the first argument is a directory.  So, the 
! ``portability help'' we get from \Tool{Autoconf} is no help.  
! Consequently, the test for
! [[ln -s]] is commented out for the moment.
  <<file utils>>=
  AC_PROG_INSTALL
! # AC_PROG_LN_S
  AC_CHECK_PROG([TOUCH], [touch],
                [touch], [AC_MSG_ERROR(['touch' program is missing.])])
  AC_CHECK_PROGS([MKTEMP], [mktemp])
*** src/scripts/document.in     (revision 15445)
--- src/scripts/document.in     (local)
***************
*** 37,42 ****
--- 37,51 ----
  #       Anything that comes after is treated as an argument, even
  #       if it looks like an option
  
+ ## 2007-04-10:
+ ##   After moving to a recent version of MSYS, and GCL-2.6.8pre, I
+ ##   noticed that double-colon ('::' in boottran::boottocl) will be
+ ##   translated to semi-colon (';') as if interpreted for path
+ ##   separator.  I don't who is doing that, and I have no time to
+ ##   investigate it, and even if I do, it would not help much.  
+ ##   Therefore, I've changed the script not to use double-colon.
+ ##      -- Gaby
+ 
  
  # set -x
  
*************** load_lisp_and_save_image() {
*** 121,132 ****
             ## image.  Consequently, we don't supply the $quiet flags
             ## when loading-and-saving.
           if test $enable_checking = yes; then
!               $command $eval_flags \
                   "(progn (proclaim (quote (optimize safety))) (load \"$1\"))" 
\
!              $eval_flags "(boottran::save-core \"$output\")"
             else
                $command $eval_flags "(load \"$1\")" \
!                $eval_flags "(boottran::save-core \"$output\")"
             fi
           ;;
        *)
--- 130,143 ----
             ## image.  Consequently, we don't supply the $quiet flags
             ## when loading-and-saving.
           if test $enable_checking = yes; then
!               $command $eval_flags "(in-package \"boottran\")" \
!                 $eval_flags \
                   "(progn (proclaim (quote (optimize safety))) (load \"$1\"))" 
\
!                 $eval_flags "(save-core \"$output\")"
             else
                $command $eval_flags "(load \"$1\")" \
!                 $eval_flags "(in-package \"boottran\")" \
!                 $eval_flags "(save-core \"$output\")"
             fi
           ;;
        *)
*************** load_lisp_and_save_image() {
*** 140,147 ****
  make_program() {
      case $lisp_flavor in
        gcl|sbcl|clisp)
!            $command $eval_flags \
!              "(boottran::make-program \"$output\" (quote ($*)))"
           ;;
        *)
           error "don't know how to build program with '$lisp_flavor' Lisp"
--- 151,158 ----
  make_program() {
      case $lisp_flavor in
        gcl|sbcl|clisp)
!            $command $eval_flags "(in-package \"boottran\")" \
!              $eval_flags "(make-program \"$output\" (quote ($*)))"
           ;;
        *)
           error "don't know how to build program with '$lisp_flavor' Lisp"
*************** make_program() {
*** 156,163 ****
  translate_boot_file() {
      case $lisp_flavor in
        gcl|sbcl|clisp)
!          $command $quiet $eval_flags \
!              "(progn (boottran::boottoclc \"$1\") (quit))" | tee $2 
           ;;
        *)
           error "don't know how to translate with '$lisp_flavor' Lisp"
--- 167,174 ----
  translate_boot_file() {
      case $lisp_flavor in
        gcl|sbcl|clisp)
!          $command $quiet $eval_flags "(in-package \"boottran\")" \
!              $eval_flags "(progn (boottoclc \"$1\") (quit))" | tee $2 
           ;;
        *)
           error "don't know how to translate with '$lisp_flavor' Lisp"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]