Skip to content

Commit

Permalink
merged with trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
paende committed Oct 20, 2010
1 parent 4b3ff37 commit e5e652c
Show file tree
Hide file tree
Showing 157 changed files with 5,111 additions and 1,003 deletions.
6 changes: 5 additions & 1 deletion EHC/Makefile
Expand Up @@ -77,6 +77,9 @@ include $(SRC_PREFIX)rts/files.mk
ifeq ($(ENABLE_JAVA),yes)
-include $(SRC_PREFIX)jazy/files.mk
endif
ifeq ($(ENABLE_JSCRIPT),yes)
-include $(SRC_PREFIX)jscript/files.mk
endif
include $(SRC_PREFIX)ehc/files2.mk
-include $(SRC_PREFIX)agprimer/files.mk
-include $(SRC_PREFIX)infer2pass/variant.mk
Expand Down Expand Up @@ -383,7 +386,8 @@ release-prepare:
FUN_PREFIX2DIR = $(patsubst %/,%,$(1))

tst:
@echo $(EHCLIB_SH_MAP_PKG2VERSIONED)
@echo $(EHC_VARIANT_TARGET)
@echo $(EHC_CFG_USE_UNIX_AND_C)

tstv:
$(MAKE) EHC_VARIANT=100 tst
Expand Down
2 changes: 1 addition & 1 deletion EHC/SVNREVISION
@@ -1 +1 @@
2169M
2177M
2 changes: 1 addition & 1 deletion EHC/VERSION
@@ -1 +1 @@
1.1.1
1.1.2
109 changes: 100 additions & 9 deletions EHC/configure
Expand Up @@ -681,6 +681,7 @@ javacCmd
jarCmd
JAVAC_CMD
JAR_CMD
ENABLE_JSCRIPT
ENABLE_LLVM
ENABLE_CLR
ENABLE_TYCORE
Expand All @@ -689,6 +690,8 @@ ranlibCmd
RANLIB_CMD
arCmd
AR_CMD
catCmd
CAT_CMD
libtoolStaticCmd
EHC_BUILD_SUFFIX
GCC_EHC_OPTIONS
Expand Down Expand Up @@ -749,7 +752,8 @@ GMP_LIB_ARCHIVE
GCC_EHC_EXTRA_EXTERN_LIBS
SUFFIX_SHELL
SUFFIX_EXEC
SUFFIX_LIB
SUFFIX_LIBC
SUFFIX_LIBJSCRIPT
PREFIX_LIB
PATHS_SEP
SLASH
Expand Down Expand Up @@ -1363,6 +1367,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-java include java code generation
--enable-jscript include JavaScript code generation
--enable-llvm include llvm code generation
--enable-clr include clr code generation
--enable-tycore include TyCore typed intermediate language
Expand Down Expand Up @@ -2361,6 +2366,17 @@ echo "$as_me: error:

fi

### enable options: jscript (JavaScript)
# Check whether --enable-jscript was given.
if test "${enable_jscript+set}" = set; then
enableval=$enable_jscript; enableJScript=yes
else
enableJScript=no
fi

ENABLE_JSCRIPT=$enableJScript


### enable options: llvm
# Check whether --enable-llvm was given.
if test "${enable_llvm+set}" = set; then
Expand Down Expand Up @@ -2541,6 +2557,74 @@ esac
AR_CMD=$arCmd


### cat

# Extract the first word of "cat", so it can be a program name with args.
set dummy cat; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_catCmd+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $catCmd in
[\\/]* | ?:[\\/]*)
ac_cv_path_catCmd="$catCmd" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_catCmd="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

;;
esac
fi
catCmd=$ac_cv_path_catCmd
if test -n "$catCmd"; then
{ echo "$as_me:$LINENO: result: $catCmd" >&5
echo "${ECHO_T}$catCmd" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


if test -z "$catCmd"; then

{ { echo "$as_me:$LINENO: error:
You must install cat before you can continue
Perhaps it is already installed, but not in your PATH?" >&5
echo "$as_me: error:
You must install cat before you can continue
Perhaps it is already installed, but not in your PATH?" >&2;}
{ (exit 1); exit 1; }; }

fi

# See remarks about cpp
case $HostPlatform in
i*86-*-mingw* | i*86-*-cygwin* )
if test ! -x "$toplevelSystemAbsolutePathPrefix/$catCmd"
then
catCmd="`echo $catCmd | sed -e 's+/usr++'`"
fi
;;
*)
;;
esac
CAT_CMD=$catCmd


### libtool

# Extract the first word of "libtool", so it can be a program name with args.
Expand Down Expand Up @@ -30891,7 +30975,8 @@ GCC_EHC_EXTRA_EXTERN_LIBS="$gcc_ehc_extra_extern_libs"
# file suffixes
suffix_shell=""
suffix_exec=""
suffix_lib=".a"
suffix_libC=".a"
suffix_libJScript=".mjs"
prefix_lib=""
# development platform
development_platform="UNIX"
Expand All @@ -30911,7 +30996,7 @@ case $HostPlatform in
# file suffixes
suffix_shell=".bat"
suffix_exec=".exe"
#suffix_lib=".lib"
#suffix_libC=".lib"
#prefix_lib="lib"
development_platform="CYGWIN"
# path separator
Expand Down Expand Up @@ -30948,7 +31033,9 @@ SUFFIX_SHELL="$suffix_shell"

SUFFIX_EXEC="$suffix_exec"

SUFFIX_LIB="$suffix_lib"
SUFFIX_LIBC="$suffix_libC"

SUFFIX_LIBJSCRIPT="$suffix_libJScript"

PREFIX_LIB="$prefix_lib"

Expand Down Expand Up @@ -31762,6 +31849,7 @@ javacCmd!$javacCmd$ac_delim
jarCmd!$jarCmd$ac_delim
JAVAC_CMD!$JAVAC_CMD$ac_delim
JAR_CMD!$JAR_CMD$ac_delim
ENABLE_JSCRIPT!$ENABLE_JSCRIPT$ac_delim
ENABLE_LLVM!$ENABLE_LLVM$ac_delim
ENABLE_CLR!$ENABLE_CLR$ac_delim
ENABLE_TYCORE!$ENABLE_TYCORE$ac_delim
Expand All @@ -31770,6 +31858,8 @@ ranlibCmd!$ranlibCmd$ac_delim
RANLIB_CMD!$RANLIB_CMD$ac_delim
arCmd!$arCmd$ac_delim
AR_CMD!$AR_CMD$ac_delim
catCmd!$catCmd$ac_delim
CAT_CMD!$CAT_CMD$ac_delim
libtoolStaticCmd!$libtoolStaticCmd$ac_delim
EHC_BUILD_SUFFIX!$EHC_BUILD_SUFFIX$ac_delim
GCC_EHC_OPTIONS!$GCC_EHC_OPTIONS$ac_delim
Expand All @@ -31790,9 +31880,6 @@ hsc2hsCmd!$hsc2hsCmd$ac_delim
HSC2HS_CMD!$HSC2HS_CMD$ac_delim
haddockCmd!$haddockCmd$ac_delim
HADDOCK_CMD!$HADDOCK_CMD$ac_delim
HADDOCK_VERSION!$HADDOCK_VERSION$ac_delim
OPT_GHC_STANDARD_PACKAGES!$OPT_GHC_STANDARD_PACKAGES$ac_delim
CABAL_BASE_LIB_DEPENDS!$CABAL_BASE_LIB_DEPENDS$ac_delim
_ACEOF

if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Expand Down Expand Up @@ -31834,6 +31921,9 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
HADDOCK_VERSION!$HADDOCK_VERSION$ac_delim
OPT_GHC_STANDARD_PACKAGES!$OPT_GHC_STANDARD_PACKAGES$ac_delim
CABAL_BASE_LIB_DEPENDS!$CABAL_BASE_LIB_DEPENDS$ac_delim
CABAL_EXTRA_LIB_DEPENDS!$CABAL_EXTRA_LIB_DEPENDS$ac_delim
CABAL_OPT_ALLOW_UNDECIDABLE_INSTANCES!$CABAL_OPT_ALLOW_UNDECIDABLE_INSTANCES$ac_delim
uuagcCmd!$uuagcCmd$ac_delim
Expand Down Expand Up @@ -31871,7 +31961,8 @@ GMP_LIB_ARCHIVE!$GMP_LIB_ARCHIVE$ac_delim
GCC_EHC_EXTRA_EXTERN_LIBS!$GCC_EHC_EXTRA_EXTERN_LIBS$ac_delim
SUFFIX_SHELL!$SUFFIX_SHELL$ac_delim
SUFFIX_EXEC!$SUFFIX_EXEC$ac_delim
SUFFIX_LIB!$SUFFIX_LIB$ac_delim
SUFFIX_LIBC!$SUFFIX_LIBC$ac_delim
SUFFIX_LIBJSCRIPT!$SUFFIX_LIBJSCRIPT$ac_delim
PREFIX_LIB!$PREFIX_LIB$ac_delim
PATHS_SEP!$PATHS_SEP$ac_delim
SLASH!$SLASH$ac_delim
Expand Down Expand Up @@ -31902,7 +31993,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF

if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Expand Down
27 changes: 24 additions & 3 deletions EHC/configure.ac
Expand Up @@ -128,6 +128,10 @@ then
AC_SUBST(JAR_CMD,$jarCmd)
fi

### enable options: jscript (JavaScript)
AC_ARG_ENABLE(jscript, AS_HELP_STRING([--enable-jscript],[include JavaScript code generation]), [enableJScript=yes], [enableJScript=no])
AC_SUBST(ENABLE_JSCRIPT,$enableJScript)

### enable options: llvm
AC_ARG_ENABLE(llvm, AS_HELP_STRING([--enable-llvm],[include llvm code generation]), [enableLlvm=yes], [enableLlvm=no])
AC_SUBST(ENABLE_LLVM,$enableLlvm)
Expand Down Expand Up @@ -174,6 +178,21 @@ case $HostPlatform in
esac
AC_SUBST(AR_CMD,$arCmd)

### cat
REQUIRED_PROG_FOR_EH(catCmd,cat)
# See remarks about cpp
case $HostPlatform in
i*86-*-mingw* | i*86-*-cygwin* )
if test ! -x "$toplevelSystemAbsolutePathPrefix/$catCmd"
then
catCmd="`echo $catCmd | sed -e 's+/usr++'`"
fi
;;
*)
;;
esac
AC_SUBST(CAT_CMD,$catCmd)

### libtool
REQUIRED_OPTIONAL_PROG_FOR_EH(libtoolStaticCmd,libtool)

Expand Down Expand Up @@ -946,7 +965,8 @@ AC_SUBST(GCC_EHC_EXTRA_EXTERN_LIBS,"$gcc_ehc_extra_extern_libs")
# file suffixes
suffix_shell=""
suffix_exec=""
suffix_lib=".a"
suffix_libC=".a"
suffix_libJScript=".mjs"
prefix_lib=""
# development platform
development_platform="UNIX"
Expand All @@ -966,7 +986,7 @@ case $HostPlatform in
# file suffixes
suffix_shell=".bat"
suffix_exec=".exe"
#suffix_lib=".lib"
#suffix_libC=".lib"
#prefix_lib="lib"
development_platform="CYGWIN"
# path separator
Expand Down Expand Up @@ -1001,7 +1021,8 @@ esac
# suffixes, path separator, ...
AC_SUBST(SUFFIX_SHELL,"$suffix_shell")
AC_SUBST(SUFFIX_EXEC,"$suffix_exec")
AC_SUBST(SUFFIX_LIB,"$suffix_lib")
AC_SUBST(SUFFIX_LIBC,"$suffix_libC")
AC_SUBST(SUFFIX_LIBJSCRIPT,"$suffix_libJScript")
AC_SUBST(PREFIX_LIB,"$prefix_lib")
AC_SUBST(PATHS_SEP,"$paths_sep")
AC_SUBST(SLASH,"$slash")
Expand Down
6 changes: 3 additions & 3 deletions EHC/ehclib/base/Prelude.hs
Expand Up @@ -26,7 +26,7 @@ module Prelude
, module UHC.Show
, module UHC.Read
, module UHC.Run
#if defined (__UHC_TARGET_C__) || defined (__UHC_TARGET_LLVM__)
#if ( defined(__UHC_TARGET_C__) || defined(__UHC_TARGET_JSCRIPT__) || defined (__UHC_TARGET_LLVM__) )
, module UHC.OldIO
#else
, module System.IO
Expand Down Expand Up @@ -69,13 +69,13 @@ import UHC.Show
import UHC.Read
import UHC.IOBase
( IOError, ioError, userError, catch, unsafePerformIO
#if defined (__UHC_TARGET_C__) || defined (__UHC_TARGET_LLVM__)
#if (defined(__UHC_TARGET_C__) || defined (__UHC_TARGET_LLVM__)) && !defined(__UHC_TARGET_JSCRIPT__)
, FilePath
#endif
)
import UHC.Run

#if defined (__UHC_TARGET_C__) || defined (__UHC_TARGET_LLVM__)
#if ( defined(__UHC_TARGET_C__) || defined(__UHC_TARGET_JSCRIPT__) || defined (__UHC_TARGET_LLVM__) )
import UHC.OldIO
#else
import System.IO
Expand Down
2 changes: 2 additions & 0 deletions EHC/ehclib/base/System/CPUTime.hsc
@@ -1,3 +1,5 @@
{-# EXCLUDE_IF_TARGET jscript #-}

-----------------------------------------------------------------------------
-- |
-- Module : System.CPUTime
Expand Down
2 changes: 2 additions & 0 deletions EHC/ehclib/base/System/Console/GetOpt.hs
@@ -1,3 +1,5 @@
{-# EXCLUDE_IF_TARGET jscript #-}

-----------------------------------------------------------------------------
-- |
-- Module : System.Console.GetOpt
Expand Down
1 change: 1 addition & 0 deletions EHC/ehclib/base/System/Environment.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
{-# EXCLUDE_IF_TARGET jscript #-}

-----------------------------------------------------------------------------
-- |
Expand Down
1 change: 1 addition & 0 deletions EHC/ehclib/filepath/System/FilePath.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}

{- |
Module : System.FilePath
Copyright : (c) Neil Mitchell 2005-2007
Expand Down
1 change: 1 addition & 0 deletions EHC/ehclib/filepath/System/FilePath/Posix.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}

#define MODULE_NAME Posix

#ifndef IS_WINDOWS
Expand Down

0 comments on commit e5e652c

Please sign in to comment.