From: bernhardheld Date: Tue, 22 Apr 2003 20:25:26 +0000 (+0000) Subject: * Makefile.common.in: added @EXEEXT@ X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1fa49320077c9f225ef75c71a9cb26f5c181d2f6;p=fw%2Fsdcc * Makefile.common.in: added @EXEEXT@ * configure.in: removed all mingw32 stuff * configure: rebuilt from configure.in * doc/sdccman.lyx: updated section "installation" * support/scripts/sdcc_mingw32: adapted to configure * support/scripts/sdcc_cygwin_mingw32: added git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2557 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index c1a1d3ef..29ff3feb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-04-22 Bernhard Held + + * Makefile.common.in: added @EXEEXT@ + * configure.in: removed all mingw32 stuff + * configure: rebuilt from configure.in + * doc/sdccman.lyx: updated section "installation" + * support/scripts/sdcc_mingw32: adapted to configure + * support/scripts/sdcc_cygwin_mingw32: added + 2003-04-22 Scott Dattalo * src/pic Added object file support for the PIC port diff --git a/Makefile.common.in b/Makefile.common.in index 8f8b7190..8dd978b5 100644 --- a/Makefile.common.in +++ b/Makefile.common.in @@ -41,6 +41,7 @@ OPT_ENABLE_PACKIHX = @OPT_ENABLE_PACKIHX@ SLIB = $(PRJDIR)/support/Util +EXEEXT = @EXEEXT@ transform = @program_transform_name@ # Flags diff --git a/configure b/configure index 906cf03e..e01cd7f4 100755 --- a/configure +++ b/configure @@ -311,7 +311,7 @@ ac_includes_default="\ ac_subdirs_all="$ac_subdirs_all support/cpp2" ac_subdirs_all="$ac_subdirs_all packihx" ac_subdirs_all="$ac_subdirs_all sim/ucsim" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP LYX LATEX LATEX2HTML PDFLATEX DVIPDF EGREP M_OR_MM include_dir_suffix lib_dir_suffix docdir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP LYX LATEX LATEX2HTML PDFLATEX DVIPDF EGREP M_OR_MM sdccconf_h_dir_separator include_dir_suffix lib_dir_suffix docdir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -780,6 +780,22 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_sdccconf_h_dir_separator_set=${sdccconf_h_dir_separator+set} +ac_env_sdccconf_h_dir_separator_value=$sdccconf_h_dir_separator +ac_cv_env_sdccconf_h_dir_separator_set=${sdccconf_h_dir_separator+set} +ac_cv_env_sdccconf_h_dir_separator_value=$sdccconf_h_dir_separator +ac_env_include_dir_suffix_set=${include_dir_suffix+set} +ac_env_include_dir_suffix_value=$include_dir_suffix +ac_cv_env_include_dir_suffix_set=${include_dir_suffix+set} +ac_cv_env_include_dir_suffix_value=$include_dir_suffix +ac_env_lib_dir_suffix_set=${lib_dir_suffix+set} +ac_env_lib_dir_suffix_value=$lib_dir_suffix +ac_cv_env_lib_dir_suffix_set=${lib_dir_suffix+set} +ac_cv_env_lib_dir_suffix_value=$lib_dir_suffix +ac_env_docdir_set=${docdir+set} +ac_env_docdir_value=$docdir +ac_cv_env_docdir_set=${docdir+set} +ac_cv_env_docdir_value=$docdir # # Report the --help message. @@ -879,6 +895,13 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor + sdccconf_h_dir_separator + needed in sdccconf.h: either "/" (default) or "\\" + include_dir_suffix + appended to datadir to define SDCC's include directory + lib_dir_suffix + appended to datadir to define SDCC's library root directory + docdir documentation installation directory Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1343,8 +1366,6 @@ fi VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'` VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'` VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'` -# Assume no special extension -EXEEXT=`echo $EXEEXT` echo "$as_me:$LINENO: result: ${VERSION}" >&5 echo "${ECHO_T}${VERSION}" >&6 @@ -6103,89 +6124,60 @@ esac # And we want to preserve the macros (e.g. ${prefix}) in the Makefiles. # The variables in the Makefiles are replaced by AC_SUBST() # -# In sdccconf.h the '/' in paths are replaced by "\\" (normalized). +# In sdccconf.h the '/' in paths can be replaced by "\\" (normalized), if +# # The macros are expanded for the header. # The variables in the header are replaced by AC_*DEFINE*() +# sdccconf_h_dir_separator contains a backslash. -echo "$as_me:$LINENO: checking -mno-cygwin" >&5 -echo $ECHO_N "checking -mno-cygwin... $ECHO_C" >&6 - case ${CFLAGS} in - *-mno-cygwin*) - MINGW32_HOST="yes" - ;; - *) - MINGW32_HOST="no" - ;; - esac -echo "$as_me:$LINENO: result: $MINGW32_HOST" >&5 -echo "${ECHO_T}$MINGW32_HOST" >&6 - -echo "$as_me:$LINENO: checking host mingw32" >&5 -echo $ECHO_N "checking host mingw32... $ECHO_C" >&6 - case ${host} in - *mingw32*) - MINGW32_HOST="yes" - ;; - esac -echo "$as_me:$LINENO: result: $MINGW32_HOST" >&5 -echo "${ECHO_T}$MINGW32_HOST" >&6 - -if test "${MINGW32_HOST}" = "no"; then - dir_separator="/" -else - dir_separator="\\\\" +if test "${sdccconf_h_dir_separator}" = ""; then + sdccconf_h_dir_separator="/" fi - # Makefiles ########### # include_dir_suffix: -# *nix default: "sdcc/include" -# mingw32 default: "include" - if test "${MINGW32_HOST}" = "no"; then - include_dir_suffix="sdcc/include" - else - include_dir_suffix="include" - fi +# *nix default: "sdcc/include" + + +if test "${include_dir_suffix}" = ""; then + include_dir_suffix="sdcc/include" +fi # lib_dir_suffix: -# *nix default: "sdcc/lib" -# mingw32 default: "lib" - if test "${MINGW32_HOST}" = "no"; then - lib_dir_suffix="sdcc/lib" - else - lib_dir_suffix="lib" - fi +# *nix default: "sdcc/lib" + +if test "${lib_dir_suffix}" = ""; then + lib_dir_suffix="sdcc/lib" +fi # docdir: -# *nix default: "${datadir}/sdcc/doc" -# mingw32 default: "${datadir}/doc" - if test "${MINGW32_HOST}" = "no"; then - doc_suffix="/sdcc/doc" - else - doc_suffix="/doc" - fi - docdir="\${datadir}"${doc_suffix} +# *nix default: "${datadir}/sdcc/doc" + +if test "${docdir}" = ""; then + docdir="\${datadir}"/sdcc/doc +fi + + # sdccconf.h ############ cat >>confdefs.h <<_ACEOF -#define DIR_SEPARATOR_STRING "${dir_separator}" +#define DIR_SEPARATOR_STRING "${sdccconf_h_dir_separator}" _ACEOF cat >>confdefs.h <<_ACEOF -#define DIR_SEPARATOR_CHAR '${dir_separator}' +#define DIR_SEPARATOR_CHAR '${sdccconf_h_dir_separator}' _ACEOF # prefix: -# *nix default: "NONE", ${ac_default_prefix}: "/usr/local" -# mingw32 default: "/sdcc" +# default: "NONE", ${ac_default_prefix}: "/usr/local" test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' @@ -6204,7 +6196,7 @@ _ACEOF :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6212,7 +6204,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6243,7 +6235,7 @@ _ACEOF :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6251,7 +6243,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6282,7 +6274,7 @@ _ACEOF :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6290,7 +6282,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6302,8 +6294,7 @@ _ACEOF # datadir: -# *nix default: "${prefix}/share" -# mingw32 default: "/sdcc" +# default: "${prefix}/share" test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' @@ -6322,7 +6313,7 @@ _ACEOF :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6330,7 +6321,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6351,7 +6342,7 @@ case ":$norm_inc_dir_suffix:" in :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6359,7 +6350,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) norm_inc_dir_suffix=`echo "[$]norm_inc_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6377,7 +6368,7 @@ case ":$norm_lib_dir_suffix:" in :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6385,7 +6376,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) norm_lib_dir_suffix=`echo "[$]norm_lib_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6435,7 +6426,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6456,7 +6447,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6502,7 +6493,7 @@ case "$_lcl_notation" in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6517,7 +6508,7 @@ case ":$bin2data_dir:" in :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6525,7 +6516,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) bin2data_dir=`echo "[$]bin2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) bin2data_dir=`echo "$bin2data_dir" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6574,7 +6565,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6595,7 +6586,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6641,7 +6632,7 @@ case "$_lcl_notation" in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6656,7 +6647,7 @@ case ":$prefix2bin_dir:" in :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6664,7 +6655,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) prefix2bin_dir=`echo "[$]prefix2bin_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6713,7 +6704,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6734,7 +6725,7 @@ case '/' in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6780,7 +6771,7 @@ case "$_lcl_notation" in # - convert the first slash # - replace a slash with a double-backslash # *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6795,7 +6786,7 @@ case ":$prefix2data_dir:" in :*:) ;; esac # squeze repeated slashes -case $dir_separator in +case $sdccconf_h_dir_separator in # if the path contains any backslashes, turn slashes into backslashes # Bernhard Held 2003-04-06 @@ -6803,7 +6794,7 @@ case $dir_separator in # - convert the first slash # - replace a slash with a double-backslash # *\\*) prefix2data_dir=`echo "[$]prefix2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,[\\/][\\/]*,\\\\\\\\,g'` ;; + *\\*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; @@ -6843,11 +6834,11 @@ cat >>confdefs.h <<_ACEOF _ACEOF cat >>confdefs.h <<_ACEOF -#define STD_xa51_LIB "xa51" +#define STD_XA51_LIB "libxa51" _ACEOF -# environment variables +# SDCC runtime environment variables sdcc_dir_name="SDCC_HOME" cat >>confdefs.h <<_ACEOF #define SDCC_DIR_NAME "${sdcc_dir_name}" @@ -7787,6 +7778,7 @@ s,@PDFLATEX@,$PDFLATEX,;t t s,@DVIPDF@,$DVIPDF,;t t s,@EGREP@,$EGREP,;t t s,@M_OR_MM@,$M_OR_MM,;t t +s,@sdccconf_h_dir_separator@,$sdccconf_h_dir_separator,;t t s,@include_dir_suffix@,$include_dir_suffix,;t t s,@lib_dir_suffix@,$lib_dir_suffix,;t t s,@docdir@,$docdir,;t t diff --git a/configure.in b/configure.in index 91c88880..8b26d953 100755 --- a/configure.in +++ b/configure.in @@ -18,8 +18,6 @@ fi VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'` VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'` VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'` -# Assume no special extension -EXEEXT=`echo $EXEEXT` AC_MSG_RESULT(${VERSION}) AC_SUBST(VERSION) @@ -156,7 +154,7 @@ case ifelse($2,,"[$]$1",$2) in # - convert the first slash # - replace a slash with a double-backslash # *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; - *\\*) $1=`echo "[$]$1" | sed 's,[[\\/]][[\\/]]*,\\\\\\\\,g'` ;; + *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\\\\\,g' | sed 's,^[[\\/]],\\\\\\\\,'` ;; # if the path contains slashes, also turn backslashes into slashes *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;; @@ -381,121 +379,95 @@ AC_C_BIGENDIAN # And we want to preserve the macros (e.g. ${prefix}) in the Makefiles. # The variables in the Makefiles are replaced by AC_SUBST() # -# In sdccconf.h the '/' in paths are replaced by "\\" (normalized). +# In sdccconf.h the '/' in paths can be replaced by "\\" (normalized), if +# # The macros are expanded for the header. # The variables in the header are replaced by AC_*DEFINE*() - -AC_MSG_CHECKING(-mno-cygwin) - case ${CFLAGS} in - *-mno-cygwin*) - MINGW32_HOST="yes" - ;; - *) - MINGW32_HOST="no" - ;; - esac -AC_MSG_RESULT($MINGW32_HOST) - -AC_MSG_CHECKING(host mingw32) - case ${host} in - *mingw32*) - MINGW32_HOST="yes" - ;; - esac -AC_MSG_RESULT($MINGW32_HOST) - -if test "${MINGW32_HOST}" = "no"; then - dir_separator="/" -else - dir_separator="\\\\" +# sdccconf_h_dir_separator contains a backslash. +AC_ARG_VAR(sdccconf_h_dir_separator, needed in sdccconf.h: either "/" (default) or "\\") +if test "${sdccconf_h_dir_separator}" = ""; then + sdccconf_h_dir_separator="/" fi - # Makefiles ########### # include_dir_suffix: -# *nix default: "sdcc/include" -# mingw32 default: "include" - if test "${MINGW32_HOST}" = "no"; then - include_dir_suffix="sdcc/include" - else - include_dir_suffix="include" - fi +# *nix default: "sdcc/include" + +AC_ARG_VAR(include_dir_suffix, appended to datadir to define SDCC's include directory) +if test "${include_dir_suffix}" = ""; then + include_dir_suffix="sdcc/include" +fi AC_SUBST(include_dir_suffix) # lib_dir_suffix: -# *nix default: "sdcc/lib" -# mingw32 default: "lib" - if test "${MINGW32_HOST}" = "no"; then - lib_dir_suffix="sdcc/lib" - else - lib_dir_suffix="lib" - fi +# *nix default: "sdcc/lib" +AC_ARG_VAR(lib_dir_suffix, appended to datadir to define SDCC's library root directory) +if test "${lib_dir_suffix}" = ""; then + lib_dir_suffix="sdcc/lib" +fi AC_SUBST(lib_dir_suffix) # docdir: -# *nix default: "${datadir}/sdcc/doc" -# mingw32 default: "${datadir}/doc" - if test "${MINGW32_HOST}" = "no"; then - doc_suffix="/sdcc/doc" - else - doc_suffix="/doc" - fi - docdir="\${datadir}"${doc_suffix} +# *nix default: "${datadir}/sdcc/doc" +AC_ARG_VAR(docdir, documentation installation directory) +if test "${docdir}" = ""; then + docdir="\${datadir}"/sdcc/doc +fi AC_SUBST(docdir) +AC_SUBST(EXEEXT) + # sdccconf.h ############ -AC_DEFINE_UNQUOTED(DIR_SEPARATOR_STRING, "${dir_separator}") -AC_DEFINE_UNQUOTED(DIR_SEPARATOR_CHAR , '${dir_separator}') +AC_DEFINE_UNQUOTED(DIR_SEPARATOR_STRING, "${sdccconf_h_dir_separator}") +AC_DEFINE_UNQUOTED(DIR_SEPARATOR_CHAR , '${sdccconf_h_dir_separator}') # prefix: -# *nix default: "NONE", ${ac_default_prefix}: "/usr/local" -# mingw32 default: "/sdcc" +# default: "NONE", ${ac_default_prefix}: "/usr/local" AC_EXPAND(prefix, ac_default_prefix, expanded_prefix) -AC_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, dir_separator) +AC_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, sdccconf_h_dir_separator) # exec_prefix: # default: "${prefix}" AC_EXPAND(exec_prefix, expanded_prefix, expanded_exec_prefix) -AC_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, dir_separator) +AC_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, sdccconf_h_dir_separator) # bindir: # default: "${exec_prefix}/bin" AC_EXPAND(bindir, "NONE", expanded_bindir) -AC_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, dir_separator) +AC_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, sdccconf_h_dir_separator) # datadir: -# *nix default: "${prefix}/share" -# mingw32 default: "/sdcc" +# default: "${prefix}/share" AC_EXPAND(datadir, "NONE", expanded_datadir) -AC_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, dir_separator) +AC_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, sdccconf_h_dir_separator) # include/lib suffix norm_inc_dir_suffix=${include_dir_suffix} -adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$dir_separator]) +adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}") norm_lib_dir_suffix=${lib_dir_suffix} -adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$dir_separator]) +adl_NORMALIZE_PATH([norm_lib_dir_suffix], [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(LIB_DIR_SUFFIX, DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}") # relative paths adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir]) -adl_NORMALIZE_PATH(bin2data_dir, [$dir_separator]) +adl_NORMALIZE_PATH(bin2data_dir, [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(BIN2DATA_DIR, DIR_SEPARATOR_STRING "${bin2data_dir}") adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_bindir:prefix2bin_dir]) -adl_NORMALIZE_PATH(prefix2bin_dir, [$dir_separator]) +adl_NORMALIZE_PATH(prefix2bin_dir, [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(PREFIX2BIN_DIR, DIR_SEPARATOR_STRING "${prefix2bin_dir}") adl_COMPUTE_RELATIVE_PATHS([expanded_prefix:expanded_datadir:prefix2data_dir]) -adl_NORMALIZE_PATH(prefix2data_dir, [$dir_separator]) +adl_NORMALIZE_PATH(prefix2data_dir, [$sdccconf_h_dir_separator]) if test "${prefix2data_dir}" = "."; then # small optimization for Mingw32; otherwise Borut will complain ;-) AC_DEFINE_UNQUOTED(PREFIX2DATA_DIR, "") @@ -510,9 +482,9 @@ AC_DEFINE_UNQUOTED(STD_INT_LIB, "libint") AC_DEFINE_UNQUOTED(STD_LONG_LIB, "liblong") AC_DEFINE_UNQUOTED(STD_FP_LIB, "libfloat") AC_DEFINE_UNQUOTED(STD_DS390_LIB, "libds390") -AC_DEFINE_UNQUOTED(STD_xa51_LIB, "xa51") +AC_DEFINE_UNQUOTED(STD_XA51_LIB, "libxa51") -# environment variables +# SDCC runtime environment variables sdcc_dir_name="SDCC_HOME" AC_DEFINE_UNQUOTED(SDCC_DIR_NAME, "${sdcc_dir_name}") diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 0bf37885..61e8d9eb 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -330,21 +330,115 @@ If you can think of some more, please send them to the list. Installation \layout Subsection -Configure variables +Configure Options \layout Standard -The install paths and default search paths are defined when running 'configure'. - The defaults can be overriden by +The install paths, search paths and other options are defined when running + 'configure'. + The defaults can be overriden by: +\layout List +\labelwidthstring 00.00.0000 + +---prefix see tabel below +\layout List +\labelwidthstring 00.00.0000 + +---exec_prefix see tabel below +\layout List +\labelwidthstring 00.00.0000 + +---bindir see tabel below +\layout List +\labelwidthstring 00.00.0000 + +---datadir see tabel below +\layout List +\labelwidthstring 00.00.0000 + +docdir environment variable, see tabel below +\layout List +\labelwidthstring 00.00.0000 + +include_dir_suffix environment variable, see tabel below +\layout List +\labelwidthstring 00.00.0000 + +lib_dir_suffix environment variable, see tabel below +\layout List +\labelwidthstring 00.00.0000 + +sdccconf_h_dir_separator environment variable, either / or +\backslash + +\backslash + makes sense here. + This character will only be used in sdccconf.h; don't forget it's a C-header, + therefore a double-backslash is needed there. +\layout List +\labelwidthstring 00.00.0000 + +---disable-mcs51-port Excludes the Intel mcs51 port +\layout List +\labelwidthstring 00.00.0000 + +---disable-gbz80-port Excludes the Gameboy gbz80 port +\layout List +\labelwidthstring 00.00.0000 + +---disable-z80-port Excludes the z80 port +\layout List +\labelwidthstring 00.00.0000 + +---disable-avr-port Excludes the AVR port +\layout List +\labelwidthstring 00.00.0000 + +---disable-ds390-port Excludes the DS390 port +\layout List +\labelwidthstring 00.00.0000 + +---disable-pic-port Excludes the PIC port +\layout List +\labelwidthstring 00.00.0000 + +---disable-xa51-port Excludes the XA51 port +\layout List +\labelwidthstring 00.00.0000 + +---disable-ucsim Disables configuring and building of ucsim +\layout List +\labelwidthstring 00.00.0000 + +---disable-device-lib-build Disables automatically building device libraries +\layout List +\labelwidthstring 00.00.0000 + +---disable-packihx Disables building packihx +\layout List +\labelwidthstring 00.00.0000 + +---enable-libgc Use the Bohem memory allocator. + Lower runtime footprint. \layout Standard -... - TBD +Furthermore the environment variables CC, CFLAGS, ... + the tools and their arguments can be influenced. + Please see `configure ---help` and the man/info pages of `configure` for + details. \newline \newline -These configure variables are compiled into the binaries, and can only be +The names of the standard libraries STD_LIB, STD_INT_LIB, STD_LONG_LIB, + STD_FP_LIB, STD_DS390_LIB, STD_XA51_LIB and the environment variables SDCC_DIR_ +NAME, SDCC_INCLUDE_NAME, SDCC_LIB_NAME are defined by `configure` too. + At the moment it's not possible to change the default settings (it was + simply never required. +\newline + +\newline +These configure options are compiled into the binaries, and can only be changed by rerunning 'configure' and recompiling SDCC. - The configure variables are written in + The configure options are written in \emph on italics \emph default @@ -353,7 +447,15 @@ italics \newline \newline -Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds. +The settings for +\begin_inset Quotes sld +\end_inset + +Win32 builds +\begin_inset Quotes srd +\end_inset + + are used by the SDCC team to build the official Win32 binaries. The SDCC team uses Mingw32 to build the official Windows binaries, because it's \layout Enumerate @@ -367,8 +469,10 @@ a gcc compiler and last but not least the binaries can be built by cross compiling on Sourceforge's compile farm. \layout Standard -The other Win32 builds using Borland, VC or whatever don't use 'configure', - but they (hopefully) use the default Win32 paths. +See the examples, how to pass the Win32 settings to 'configure'. + The other Win32 builds using Borland, VC or whatever don't use 'configure', + but a header file sdcc_vc_in.h is the same as sdccconf.h built by 'configure' + for Win32. \newline \newline @@ -397,7 +501,7 @@ Variable \layout Standard -*nix default +default \end_inset @@ -405,7 +509,7 @@ Variable \layout Standard -Win32 default +Win32 builds \end_inset @@ -674,7 +778,7 @@ Variable (computed) \layout Standard -*nix default +default \end_inset @@ -682,7 +786,7 @@ Variable (computed) \layout Standard -Win32 default +Win32 builds \end_inset @@ -776,6 +880,341 @@ share/sdcc \end_inset +\newline + +\newline +Examples: +\layout LyX-Code + +./configure +\layout LyX-Code + +./configure ---prefix= +\begin_inset Quotes srd +\end_inset + +/usr/bin +\begin_inset Quotes srd +\end_inset + + ---datadir= +\begin_inset Quotes srd +\end_inset + +/usr/share +\begin_inset Quotes srd +\end_inset + + +\layout LyX-Code + +./configure ---disable-avr-port ---disable-xa51-port +\layout Standard + +To crosscompile on linux for Mingw32 (see also 'sdcc/support/scripts/sdcc_mingw3 +2'): +\layout LyX-Code + +./configure +\backslash + +\layout LyX-Code + + CC= +\begin_inset Quotes srd +\end_inset + +i586-mingw32msvc-gcc +\begin_inset Quotes srd +\end_inset + + CXX= +\begin_inset Quotes srd +\end_inset + +i586-mingw32msvc-g++ +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + RANLIB= +\begin_inset Quotes srd +\end_inset + +i586-mingw32msvc-ranlib +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + STRIP= +\begin_inset Quotes srd +\end_inset + +i586-mingw32msvc-strip +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---prefix= +\begin_inset Quotes srd +\end_inset + +/sdcc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---datadir= +\begin_inset Quotes srd +\end_inset + +/sdcc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + docdir= +\begin_inset Quotes srd +\end_inset + +/sdcc/doc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + include_dir_suffix= +\begin_inset Quotes srd +\end_inset + +include +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + lib_dir_suffix= +\begin_inset Quotes srd +\end_inset + +lib +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + sdccconf_h_dir_separator= +\begin_inset Quotes srd +\end_inset + + +\backslash + +\backslash + +\backslash + +\backslash + +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---disable-device-lib-build +\backslash + +\layout LyX-Code + + ---disable-ucsim +\backslash + +\layout LyX-Code + + ---program-suffix= +\begin_inset Quotes srd +\end_inset + +.exe +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---host=i586-mingw32msvc ---build=unknown-unknown-linux-gnu +\layout Standard + +To +\begin_inset Quotes sld +\end_inset + +cross +\begin_inset Quotes srd +\end_inset + +compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32) +: +\layout LyX-Code + +./configure -C +\backslash + +\layout LyX-Code + + CFLAGS= +\begin_inset Quotes srd +\end_inset + +-mno-cygwin -O2 +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + LDFLAGS= +\begin_inset Quotes srd +\end_inset + +-mno-cygwin +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---prefix= +\begin_inset Quotes srd +\end_inset + +/sdcc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---datadir= +\begin_inset Quotes srd +\end_inset + +/sdcc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + docdir= +\begin_inset Quotes srd +\end_inset + +/sdcc/doc +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + include_dir_suffix= +\begin_inset Quotes srd +\end_inset + +include +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + lib_dir_suffix= +\begin_inset Quotes srd +\end_inset + +lib +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + sdccconf_h_dir_separator= +\begin_inset Quotes srd +\end_inset + + +\backslash + +\backslash + +\backslash + +\backslash + +\begin_inset Quotes srd +\end_inset + + +\backslash + +\layout LyX-Code + + ---disable-ucsim +\layout Standard + +'configure' is quite slow on Cygwin (at least on windows before Win2000/XP). + The option '--C' turns on caching, which gives a little bit extra speed. + However if options are changed, it can be necessary to delete the config.cache + file. \layout Subsection Install paths @@ -806,7 +1245,7 @@ Path \layout Standard -*nix default +default \end_inset @@ -814,7 +1253,7 @@ Path \layout Standard -Win32 default +Win32 builds \end_inset @@ -867,7 +1306,7 @@ bin - + @@ -883,7 +1322,7 @@ Path \layout Standard -*nix default +default \end_inset @@ -891,7 +1330,7 @@ Path \layout Standard -Win32 default +Win32 builds \end_inset @@ -967,7 +1406,7 @@ Path \layout Standard -*nix default +default \end_inset @@ -975,7 +1414,7 @@ Path \layout Standard -Win32 default +Win32 builds \end_inset @@ -1044,7 +1483,7 @@ Path \layout Standard -*nix default +default \end_inset @@ -1052,7 +1491,7 @@ Path \layout Standard -Win32 default +Win32 builds \end_inset @@ -1093,9 +1532,19 @@ doc \end_inset +\newline + +\newline +The install paths can still be changed during `make install` with e.g.: +\layout LyX-Code + +make install prefix=$(HOME)/local/sdcc +\layout Standard + +Of course this doesn't change the search paths compiled into the binaries. \layout Subsection -Search paths +Search Paths \layout Standard Some search paths or parts of them are determined by configure variables @@ -1136,7 +1585,7 @@ Search path \layout Standard -*nix default +default \end_inset @@ -1144,7 +1593,7 @@ Search path \layout Standard -Win32 default +Win32 builds \end_inset @@ -1262,7 +1711,7 @@ Search path \layout Standard -*nix default +default \end_inset @@ -1270,7 +1719,7 @@ Search path \layout Standard -Win32 default +Win32 builds \end_inset @@ -1534,7 +1983,7 @@ Search path \layout Standard -*nix default +default \end_inset @@ -1542,7 +1991,7 @@ Search path \layout Standard -Win32 default +Win32 builds \end_inset @@ -1837,7 +2286,10 @@ Don't delete any of the stray spaces in the table above without checking The option ---nostdlib disables the last two search paths. \layout Subsection -Linux and other gcc-based systems (cygwin, mingw32, osx) +Building SDCC +\layout Subsubsection + +Building SDCC on Linux \layout Enumerate @@ -1931,8 +2383,15 @@ Type \series default This copies the binary executables, the include files, the libraries and the documentation to the install directories. +\layout Subsubsection + +Building SDCC on OSX 2.x \layout Standard +Follow the instruction for Linux. +\newline + +\newline On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelease )) fails to compile SDCC. Fortunately there's also gcc 2.9.x installed, which works fine. @@ -1940,9 +2399,21 @@ On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelea \layout LyX-Code ./configure CC=gcc2 CXX=g++2 -\layout Subsection +\layout Subsubsection + +Crosscompiling SDCC on Linux for Windows +\layout Standard + +With the Mingw32 gcc crosscompiler it's easy to compile SDCC for Win32. + See section 'Configure Options'. +\layout Subsubsection + +Building SDCC on Windows +\layout Standard -Windows +With the exception of Cygwin the SDCC binaries uCsim and sdcdb can't be + built on Windows. + They use Unix-sockets, which are not available on Win32. \layout Subsubsection Windows Install Using a Binary Package @@ -1954,28 +2425,14 @@ Download the binary package and unpack it using your favorite unpacking An example directory structure after unpacking the mingw32 package is: c: \backslash -usr -\backslash -local +sdcc \backslash bin for the executables, c: \backslash -usr -\backslash -local -\backslash -share -\backslash sdcc \backslash include and c: \backslash -usr -\backslash -local -\backslash -share -\backslash sdcc \backslash lib for the include and libraries. @@ -1985,14 +2442,152 @@ Adjust your environment variable PATH to include the location of the bin directory or start sdcc using the full path. \layout Subsubsection -Windows Install Using Cygwin and Mingw32 +Building SDCC using Cygwin and Mingw32 \layout Standard -Follow the instruction in -\series bold -Linux and other gcc-based systems -\series default +For building and installing a Cygwin executable follow the instructions + for Linux. +\newline + +\newline +On Cygwin a +\begin_inset Quotes sld +\end_inset + +native +\begin_inset Quotes srd +\end_inset + + Win32-binary can be built, which will not need the Cygwin-DLL. + For the necessary 'configure' options see section 'configure options' or + the script 'sdcc/support/scripts/sdcc_cygwinmingw32'. +\newline + +\newline +In order to install Cygwin on Windows download setup.exe from +\begin_inset LatexCommand \url[www.cygwin.com]{http://www.cygwin.com/} + +\end_inset + . + Run it, set the +\begin_inset Quotes sld +\end_inset + +default text file type +\begin_inset Quotes srd +\end_inset + + to +\begin_inset Quotes sld +\end_inset + +unix +\begin_inset Quotes srd +\end_inset + + and download/install at least the following packages. + Some packages are selected by default, others will be automatically selected + because of dependencies with the manually selected packages. + Never deselect these packages! +\layout Itemize + +flex +\layout Itemize + +bison +\layout Itemize + +gcc ; version 3.x is fine, no need to use the old 2.9x +\layout Itemize + +binutils ; selected with gcc +\layout Itemize + +make +\layout Itemize + +rxvt ; a nice console, which makes life much easier under windoze (see below) +\layout Itemize + +man ; not really needed for building SDCC, but you'll miss it sooner or + later +\layout Itemize + +less ; not really needed for building SDCC, but you'll miss it sooner or + later +\layout Itemize + +cvs ; only if you use CVS access +\layout Standard + +If you want to develop something you'll need: +\layout Itemize + +python ; for the regression tests +\layout Itemize + +gdb ; the gnu debugger, together with the nice GUI +\begin_inset Quotes sld +\end_inset + +insight +\begin_inset Quotes srd +\end_inset + + +\layout Itemize + +openssh ; to access the CF or commit changes +\layout Itemize + +autoconf and autoconf-devel ; if you want to fight with 'configure', don't + use autoconf-stable! +\layout Standard + +rxvt is a nice console with history. + Replace in your cygwin.bat the line +\layout LyX-Code + +bash --login -i +\layout Standard + +with (one line): +\layout LyX-Code + +rxvt -sl 1000 -fn "Lucida Console-12" -sr -cr red +\layout LyX-Code + + -bg black -fg white -geometry 100x65 -e bash --login +\layout Standard + +Text selected with the mouse is automatically copied to the clipboard, pasting + works with shift-insert. +\newline + +\newline +The other good tip is to make sure you have no //c/-style paths anywhere, + use /cygdrive/c/ instead. + Using // invokes a network lookup which is very slow. + If you think +\begin_inset Quotes sld +\end_inset + +cygdrive +\begin_inset Quotes srd +\end_inset + + is too long, you can change it with e.g. +\layout LyX-Code + +mount -s -u -c /mnt +\layout Standard + +SDCC sources use the unix line ending LF. + Life is much easier, if you store the source tree on a drive, which is + mount in binary mode. + And use an editor which can handle LF-only line endings. + Make sure not to commit files with windows line endings. \layout Subsubsection Windows Install Using Microsoft Visual C++ 6.0/NET @@ -2213,6 +2808,13 @@ del /s *.obj *.lib *.rul from the sdcc directory. \layout Subsection +Building the Documentation +\layout Standard + +... + coming soon +\layout Subsection + Testing out the SDCC Compiler \layout Standard @@ -2401,7 +3003,7 @@ SDCC does not build correctly. A thing to try is starting from scratch by unpacking the .tgz source package again in an empty directory. - Confure it like: + Configure it like: \newline \newline diff --git a/support/scripts/sdcc_cygwin_mingw32 b/support/scripts/sdcc_cygwin_mingw32 new file mode 100755 index 00000000..28fbc31d --- /dev/null +++ b/support/scripts/sdcc_cygwin_mingw32 @@ -0,0 +1,15 @@ +#!/bin/sh +# Script to "cross" compile with mingw32 under Cygwin + +./configure -C \ +CFLAGS="-mno-cygwin -O2" \ +LDFLAGS="-mno-cygwin" \ +--prefix="/sdcc" \ +--datadir="/sdcc" \ +docdir="/sdcc/doc" \ +include_dir_suffix="include" \ +lib_dir_suffix="lib" \ +sdccconf_h_dir_separator="\\\\" \ +--disable-ucsim + +make 2>&1 | tee make.log diff --git a/support/scripts/sdcc_mingw32 b/support/scripts/sdcc_mingw32 index d22b6b7f..6f88e957 100755 --- a/support/scripts/sdcc_mingw32 +++ b/support/scripts/sdcc_mingw32 @@ -1,5 +1,5 @@ #!/bin/sh -# Script to compile with mingw32 +# Script to crosscompile with mingw32 TOOLSPREFIX=/usr/local/cross-tools/i386-mingw32msvc/bin export CC=$TOOLSPREFIX/gcc @@ -7,12 +7,17 @@ export CXX=$TOOLSPREFIX/g++ export RANLIB=$TOOLSPREFIX/ranlib export STRIP=$TOOLSPREFIX/strip -export SDCCCONFIGUREFLAGS="--prefix=/sdcc --disable-device-lib-build \ ---disable-ucsim --program-suffix=.exe --datadir=/sdcc \ +export SDCCCONFIGUREFLAGS=" \ +--prefix=/sdcc \ +--datadir=/sdcc \ +docdir=/sdcc/doc \ +include_dir_suffix=include \ +lib_dir_suffix=lib \ +sdccconf_h_dir_separator=\\\\ \ +--disable-device-lib-build \ +--disable-ucsim \ +--program-suffix=.exe \ --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu" ./configure $SDCCCONFIGUREFLAGS make 2>&1 | tee make.log - - -