The use is in install.mk.in, where we need to know when
we're on Cygwin.
This fixes the build on my Windows box, where I have
both Msys and Cygwin.
fi
WithGhc="$GHC"])
+
+dnl ** Tell the make system which OS we are using
+dnl $OSTYPE is set by the operating system to "msys" or "cygwin" or something
+AC_SUBST(OSTYPE)
+
dnl ** Booting from .hc files?
dnl --------------------------------------------------------------
AC_ARG_ENABLE(hc-boot,
RAWCPP_FLAGS = -undef -traditional
FIND = @FindCmd@
SORT = @SortCmd@
-INSTALL = @INSTALL@
+
#
# Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
# install-sh script (if chosen). This not terribly useful to us, so we convert
# it into an abs. path.
#
+INSTALL = @INSTALL@
INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
+
LATEX = latex
-PDFLATEX = pdflatex
-BIBTEX = bibtex
+PDFLATEX = pdflatex
+BIBTEX = bibtex
LN_S = @LN_S@
MV = mv
NROFF = nroff
# This causes problems for bindisttest/checkBinaries.sh which then
# thinks that e.g. the userguide HTML files are binaries.
#
-# We therefore use a /cygdrive path if we are on cygwin
-ifeq '$(shell cygpath "c:/" 2> /dev/null)' ''
-MK_INSTALL_DEST = $1
-else
+# We therefore use a /cygdrive path if we are on cygwin (only)
+# (This will make a Cygwin build run slowly
+# becuase of all those shell invocations.)
+ifeq "$OSTYPE" "cygwin"
MK_INSTALL_DEST = "$(shell cygpath $1)"
+else
+MK_INSTALL_DEST = $1
endif
#
Windows=NO
endif
+# Tell the build system what the host operating system is
+# This distinguishes "msys" and "cygwin", which are not
+# not distinguished by HOST_OS_CPP
+OSTYPE=@OSTYPE@