[commit: ghc] master: Clean up some shell code and M4 quoting (c43011d)
git at git.haskell.org
git at git.haskell.org
Fri Jan 20 22:25:57 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/c43011da283bfcef664378bb451d5f3bffcdbe92/ghc
>---------------------------------------------------------------
commit c43011da283bfcef664378bb451d5f3bffcdbe92
Author: Demi Obenour <demiobenour at gmail.com>
Date: Fri Jan 20 16:49:53 2017 -0500
Clean up some shell code and M4 quoting
Test Plan: GHC CI
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2993
>---------------------------------------------------------------
c43011da283bfcef664378bb451d5f3bffcdbe92
aclocal.m4 | 13 ++++++-------
configure.ac | 32 ++++++++++++++++----------------
libraries/base/configure.ac | 6 +++---
3 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 4673ac0..75f3e7d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1056,15 +1056,14 @@ AC_SUBST([LdHasBuildId])
# -----------------
# Sets the output variable LdIsGNULd to YES or NO, depending on whether it is
# GNU ld or not.
-AC_DEFUN([FP_PROG_LD_IS_GNU],
-[
+AC_DEFUN([FP_PROG_LD_IS_GNU],[
AC_CACHE_CHECK([whether ld is GNU ld], [fp_cv_gnu_ld],
-[if ${LdCmd} --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
- fp_cv_gnu_ld=yes
+[[if ${LdCmd} --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
+ fp_cv_gnu_ld=YES
else
- fp_cv_gnu_ld=no
-fi])
-AC_SUBST([LdIsGNULd], [`echo $fp_cv_gnu_ld | sed 'y/yesno/YESNO/'`])
+ fp_cv_gnu_ld=NO
+fi]])
+AC_SUBST([LdIsGNULd],["$fp_cv_gnu_ld"])
])# FP_PROG_LD_IS_GNU
diff --git a/configure.ac b/configure.ac
index 4502c53..a7100cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,7 @@ AC_ARG_VAR(CC_STAGE0, [C compiler command (bootstrap)])
if test "$WithGhc" != ""; then
FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl
- if test "$GhcMajVersion" = "unknown" -o "$GhcMinVersion" = "unknown"; then
+ if test "$GhcMajVersion" = "unknown" || test "$GhcMinVersion" = "unknown"; then
AC_MSG_ERROR([Cannot determine the version of $WithGhc. Is it really GHC?])
fi
@@ -1144,7 +1144,7 @@ checkMake380 gmake
AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal utils/runghc/runghc.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt utils/mkUserGuidePart/mkUserGuidePart.cabal distrib/configure.ac])
AC_OUTPUT
-
+[
if test "$print_make_warning" = "true"; then
echo
echo "WARNING: It looks like \"$MakeCmd\" is GNU make 3.80."
@@ -1152,7 +1152,7 @@ if test "$print_make_warning" = "true"; then
echo "Please use GNU make >= 3.81."
fi
-echo ["
+echo "
----------------------------------------------------------------------
Configure completed successfully.
@@ -1162,12 +1162,12 @@ Configure completed successfully.
Build platform : $BuildPlatform
Host platform : $HostPlatform
Target platform : $TargetPlatform
-"]
+"
-echo ["\
+echo "\
Bootstrapping using : $WithGhc
which is version : $GhcVersion
-"]
+"
if test "x$CC_LLVM_BACKEND" = "x1"; then
if test "x$CC_CLANG_BACKEND" = "x1"; then
@@ -1179,7 +1179,7 @@ else
CompilerName="gcc "
fi
-echo ["\
+echo "\
Using (for bootstrapping) : $CC_STAGE0
Using $CompilerName : $CC
which is version : $GccVersion
@@ -1198,24 +1198,24 @@ echo ["\
Using LLVM tools
llc : $LlcCmd
- opt : $OptCmd"]
+ opt : $OptCmd"
if test "$HSCOLOUR" = ""; then
-echo ["
+echo "
HsColour was not found; documentation will not contain source links
-"]
+"
else
-echo ["\
+echo "\
HsColour : $HSCOLOUR
-"]
+"
fi
-echo ["\
+echo "\
Tools to build Sphinx HTML documentation available: $BUILD_SPHINX_HTML
Tools to build Sphinx PDF documentation available: $BUILD_SPHINX_PDF"]
-echo ["----------------------------------------------------------------------
-"]
+echo "----------------------------------------------------------------------
+"
echo "\
For a standard build of GHC (fully optimised with profiling), type (g)make.
@@ -1225,4 +1225,4 @@ mk/build.mk.sample to mk/build.mk, and edit the settings in there.
For more information on how to configure your GHC build, see
http://ghc.haskell.org/trac/ghc/wiki/Building
-"
+"]
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac
index f6816e7..426e571 100644
--- a/libraries/base/configure.ac
+++ b/libraries/base/configure.ac
@@ -51,11 +51,11 @@ AC_CHECK_FUNCS([epoll_ctl eventfd kevent kevent64 kqueue poll])
# event-related fun
-if test "$ac_cv_header_sys_epoll_h" = yes -a "$ac_cv_func_epoll_ctl" = yes; then
+if test "$ac_cv_header_sys_epoll_h" = yes && test "$ac_cv_func_epoll_ctl" = yes; then
AC_DEFINE([HAVE_EPOLL], [1], [Define if you have epoll support.])
fi
-if test "$ac_cv_header_sys_event_h" = yes -a "$ac_cv_func_kqueue" = yes; then
+if test "$ac_cv_header_sys_event_h" = yes && test "$ac_cv_func_kqueue" = yes; then
AC_DEFINE([HAVE_KQUEUE], [1], [Define if you have kqueue support.])
AC_CHECK_SIZEOF([kev.filter], [], [#include <sys/event.h>
@@ -65,7 +65,7 @@ struct kevent kev;])
struct kevent kev;])
fi
-if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then
+if test "$ac_cv_header_poll_h" = yes && test "$ac_cv_func_poll" = yes; then
AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.])
fi
More information about the ghc-commits
mailing list