Skip to content

Commit c7308c1

Browse files
committed
Merge pull request fsharp#449 from rolfbjarne/xbuild-on-el-capitan
Find xbuild on El Capitan
2 parents 6381a58 + 8fb5ea2 commit c7308c1

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

config.make.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ INSTALL_DATA = $(INSTALL) -c -m 644
131131
INSTALL_BIN = $(INSTALL) -c -m 755
132132
INSTALL_LIB = $(INSTALL_BIN)
133133

134+
XBUILD = @XBUILD@
135+
134136
EXTRA_DIST = configure
135137
NO_DIST = .gitignore lib/debug lib/proto lib/release
136138

configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ fi
2020
AC_MSG_NOTICE("pkg-config: $PKG_CONFIG")
2121
AC_MSG_NOTICE("PKG_CONFIG_LIBDIR: $PKG_CONFIG_LIBDIR")
2222

23+
# On OSX El Capitan, xbuild is no longer in PATH, so we need to use the full path.
24+
AC_PATH_PROG(XBUILD, xbuild, no)
25+
osx_xbuild=/Library/Frameworks/Mono.framework/Versions/Current/bin/xbuild
26+
if test "x$XBUILD" == "xno"; then
27+
if test -e $osx_xbuild; then
28+
XBUILD=$osx_xbuild
29+
else
30+
AC_MSG_ERROR([Could not find xbuild])
31+
fi
32+
fi
33+
AC_MSG_NOTICE(xbuild: $XBUILD)
34+
2335
MONO_REQUIRED_VERSION=3.0
2436
MONO_RECOMMENDED_VERSION=3.2
2537

src/fsharp/FSharp.Build-proto/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ srcdir := @abs_srcdir@/
66
include @abs_top_builddir@/config.make
77

88
build-proto:
9-
MONO_ENV_OPTIONS=$(monoopts) xbuild /p:Configuration=Proto
9+
MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=Proto
1010

1111
include $(topdir)/src/fsharp/targets.make
1212

src/fsharp/FSharp.Compiler-proto/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ srcdir := @abs_srcdir@/
66
include @abs_top_builddir@/config.make
77

88
build-proto:
9-
MONO_ENV_OPTIONS=$(monoopts) xbuild /p:Configuration=Proto
9+
MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=Proto
1010

1111
include $(topdir)/src/fsharp/targets.make

src/fsharp/Fsc-proto/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ srcdir := @abs_srcdir@/
66
include @abs_top_builddir@/config.make
77

88
build-proto:
9-
MONO_ENV_OPTIONS=$(monoopts) xbuild /p:Configuration=Proto
9+
MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=Proto
1010
chmod +x $(protodir)fsc-proto.exe
1111

1212
include $(topdir)/src/fsharp/targets.make

src/fsharp/targets.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ SOURCES := $(patsubst $(srcdir)$(tmpdir)%,$(tmpdir)%,$(patsubst %,$(srcdir)%,$(s
33
.PHONY: install install-lib-net20 install-lib-monodroid install-lib-net40
44

55
build:
6-
MONO_ENV_OPTIONS=$(monoopts) xbuild /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) /p:MonoLibDir40=$(monogacdir40) /p:FSharpCoreBackVersion=$(FSharpCoreBackVersion)
6+
MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) /p:MonoLibDir40=$(monogacdir40) /p:FSharpCoreBackVersion=$(FSharpCoreBackVersion)
77

88
clean:
9-
xbuild /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) /t:Clean
9+
$(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) /t:Clean
1010

1111
# Install the library binaries in the GAC and the framework directory,
1212
# Install .optdata/.sigdata if they exist (they go alongside FSharp.Core)

0 commit comments

Comments
 (0)