CVS: sml-dist/config _heap2exec,1.1,1.2 allsources,1.3,1.4 install.sh,1.50,1.51 targets,1.26,1.27 unpack,1.9,1.10

Matthias Blume <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13218/config

Modified Files:
	_heap2exec allsources install.sh targets unpack 
Log Message:
heap2exec patches from Johannes 5 Joemann

Index: _heap2exec
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/config/_heap2exec,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** _heap2exec	14 Jan 2005 23:53:17 -0000	1.1
--- _heap2exec	20 Apr 2006 15:28:53 -0000	1.2
***************
*** 1,4 ****
--- 1,17 ----
  #!@SHELL@
  
+ CMD=`basename "$0"`
+ 
+ usage() {
+ 	echo "usage: $CMD [--linkwith-<format>] heapfile execfile"
+ 	echo "       <format> = exec | so | a"
+ 	exit 1
+ }
+ 
+ die () {
+ 	echo "${CMD}: $1"
+ 	exit 1
+ }
+ 
  if [ x${SMLNJ_HOME} = x ] ; then
      BIN_DIR="@BINDIR@"
***************
*** 9,23 ****
  ARCH_N_OPSYS=`"$BIN_DIR/.arch-n-opsys"`
  if [ "$?" != "0" ]; then
!   echo "$CMD: unable to determine architecture/operating system"
!   exit 1
  fi
  eval $ARCH_N_OPSYS
  
  RUNX=${BIN_DIR}/.run/runx.${ARCH}-${OPSYS}
  H2A=${BIN_DIR}/heap2asm
  
  if [ $# != 2 ] ; then
!     echo usage: $0 heapfile execfile
!     exit 1
  fi
  
--- 22,70 ----
  ARCH_N_OPSYS=`"$BIN_DIR/.arch-n-opsys"`
  if [ "$?" != "0" ]; then
! 	die "unable to determine architecture/operating system"
  fi
  eval $ARCH_N_OPSYS
  
  RUNX=${BIN_DIR}/.run/runx.${ARCH}-${OPSYS}
+ RUN_SO=${BIN_DIR}/.run/run.${ARCH}-${OPSYS}.so
+ RUN_A=${BIN_DIR}/.run/run.${ARCH}-${OPSYS}.a
  H2A=${BIN_DIR}/heap2asm
  
+ FORMAT=
  if [ $# != 2 ] ; then
! 	if [ $# = 3 ] ; then
! 		case $1 in
! 			--linkwith-exec)
! 				FORMAT=exec
! 				;;
! 			--linkwith-so)
! 				FORMAT=so
! 				;;
! 			--linkwith-a)
! 				FORMAT=a
! 				;;
! 			*)
! 				usage
! 				;;
! 		esac
! 		shift
!    	else
! 		usage
! 	fi
! else
! 	case ${OPSYS} in
! 		darwin)
! 			FORMAT=exec
! 			;;
! 		freebsd|linux)
! 			FORMAT=a
! 			;;
! 		*)
! 			die "no default runtime link format known for ${OPSYS}"
! 			;;
! 		esac
! fi
! if [ -z "$FORMAT" ] ; then
! 	die "no runtime object format specified"
  fi
  
***************
*** 25,41 ****
  execfile=$2
  
! if [ -f $RUNX ] ; then
!     if [ -f $H2A ]; then
! 	${H2A} "$heapfile" "$execfile".s
! 	cc -c "$execfile".s
! 	ld -o "$execfile" ${RUNX} "$execfile".o -lc
! 	rm "$execfile".[so]
!     else
! 	echo $0: heap2asm is not installed
  	exit 2
!     fi
  else
!     echo $0: linkable runtime system object not available
!     exit 2
  fi
  
--- 72,153 ----
  execfile=$2
  
! CC=cc
! LD=ld
! 
! EXEC_PROG=
! EXEC_FLAGS=
! EXEC_LIBS=
! SO_PROG=
! SO_FLAGS=
! SO_LIBS=
! A_PROG=
! A_FLAGS=
! A_LIBS=
! 
! case ${OPSYS} in
! 	darwin)
! 		EXEC_PROG=${LD}
! 		EXEC_LIBS=-lc
! 		;;
! 	freebsd)
! 		SO_PROG=${CC}
! 		SO_FLAGS=-Wl,--export-dynamic
! 		SO_LIBS=-lm
! 		A_PROG=${CC}
! 		A_FLAGS=-Wl,--export-dynamic
! 		A_LIBS=-lm
! 		;;
! 	linux)
! 		SO_PROG=${CC}
! 		SO_FLAGS=-Wl,--export-dynamic
! 		A_PROG=${CC}
! 		A_FLAGS=-Wl,--export-dynamic
! 		A_LIBS="-lm -ldl"
! 		;;
! 	*)
! 		;;
! esac
! 
! if [ ! -f $H2A ]; then
! 	echo "${CMD}: heap2asm is not installed"
  	exit 2
! fi
! 
! RESULT=0
! if ${H2A} "$heapfile" "$execfile".s ; then
! 	if [ -f "$execfile".s ] ; then
! 		if ${CC} -c -o "$execfile".o "$execfile".s ; then
! 			rm "$execfile".s
! 		else
! 			rm "$execfile".s
! 			die "${execfile}.o creation failed"
! 		fi
! 	else
! 		die "${execfile}.s creation failed"
! 	fi
! 	if [ "$FORMAT" = exec -a -f "${RUNX}" ] ; then
! 		[ -z "${EXEC_PROG}" ] && die "no linker specified for runtime format $FORMAT"
! 		${EXEC_PROG} ${EXEC_FLAGS} -o "$execfile" ${RUNX} "$execfile".o ${EXEC_LIBS}
! 		RESULT=$?
! 	elif [ "$FORMAT" = so -a -f "${RUN_SO}" ] ; then
! 		[ -z "${SO_PROG}" ] && die "no linker specified for runtime format $FORMAT"
! 		${SO_PROG} ${SO_FLAGS} -o "$execfile" ${RUN_SO} "$execfile".o ${SO_LIBS}
! 		RESULT=$?
! 	elif [ "$FORMAT" = a -a -f "${RUN_A}" ] ; then
! 		[ -z "${A_PROG}" ] && die "no linker specified for runtime format $FORMAT"
! 		${A_PROG} ${A_FLAGS} -o "$execfile" ${RUN_A} "$execfile".o ${A_LIBS}
! 		RESULT=$?
! 	else
! 		echo "${CMD}: linkable runtime system object ($FORMAT) not available"
! 		rm "$execfile".o
! 		exit 2
! 	fi
! 	rm "$execfile".o
  else
! 	die "heap2asm failed"
! fi
! 
! if [ $RESULT != 0 ] ; then
! 	die "linking failed with return code $RESULT"
  fi
  

Index: allsources
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/config/allsources,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** allsources	1 Mar 2006 04:44:26 -0000	1.3
--- allsources	20 Apr 2006 15:28:53 -0000	1.4
***************
*** 25,26 ****
--- 25,28 ----
  mlrisc-tools
  smlnj-c
+ heap2asm
+ tools

Index: install.sh
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/config/install.sh,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** install.sh	20 Nov 2005 05:32:27 -0000	1.50
--- install.sh	20 Apr 2006 15:28:53 -0000	1.51
***************
*** 325,328 ****
--- 325,334 ----
  	    mv runx.$ARCH-$OPSYS "$RUNDIR"
  	fi
+ 	if [ -f run.$ARCH-$OPSYS.so ]; then
+ 	    mv run.$ARCH-$OPSYS.so "$RUNDIR"
+ 	fi
+ 	if [ -f run.$ARCH-$OPSYS.a ]; then
+ 	    mv run.$ARCH-$OPSYS.a "$RUNDIR"
+ 	fi
  	$MAKE MAKE=$MAKE clean
      else

Index: targets
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/config/targets,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** targets	1 Mar 2006 04:44:26 -0000	1.26
--- targets	20 Apr 2006 15:28:53 -0000	1.27
***************
*** 115,119 ****
  # Build and install 'heap2asm' - an experimental component of
  # a new facility for producing true stand-alone executables.
! #request heap2asm
  
  # Note: autoloading is always enabled.
--- 115,119 ----
  # Build and install 'heap2asm' - an experimental component of
  # a new facility for producing true stand-alone executables.
! request heap2asm
  
  # Note: autoloading is always enabled.

Index: unpack
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/config/unpack,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** unpack	1 Mar 2006 04:44:26 -0000	1.9
--- unpack	20 Apr 2006 15:28:53 -0000	1.10
***************
*** 287,290 ****
--- 287,293 ----
  	unpack "Heap->ASM tool" "$SRCDIR" heap2asm heap2asm
  	;;
+       tools)
+ 	unpack "debugging tools" "$SRCDIR" tools tools
+ 	;;
        doc)
  	echo Package doc is currently unavailable.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.