From 5775d5142da227d65fb86994d363eb16841ee642 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 13 Jan 2011 15:50:23 +0000 Subject: Add OSTYPE build-system variable, and use it 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. --- mk/config.mk.in | 8 +++++--- mk/install.mk.in | 10 ++++++---- mk/project.mk.in | 4 ++++ 3 files changed, 15 insertions(+), 7 deletions(-) (limited to 'mk') diff --git a/mk/config.mk.in b/mk/config.mk.in index c4a02290f7..e271cb1984 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -596,16 +596,18 @@ CTAGS = $(ETAGS) 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 diff --git a/mk/install.mk.in b/mk/install.mk.in index b63ffe38d7..6d5f724ea6 100644 --- a/mk/install.mk.in +++ b/mk/install.mk.in @@ -159,11 +159,13 @@ INSTALL_DIR = $(INSTALL) -m 755 -d $(call MK_INSTALL_DEST,$1) # 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 # diff --git a/mk/project.mk.in b/mk/project.mk.in index dc16a39216..3ceef15f30 100644 --- a/mk/project.mk.in +++ b/mk/project.mk.in @@ -135,3 +135,7 @@ else 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@ -- cgit v1.2.1