Skip to content

Commit e2eb7b2

Browse files
committed
Detect automatically whether we are on cygwin.
Signed-off-by: Konstantina Chremmou <[email protected]>
1 parent 6dea56a commit e2eb7b2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ocaml/sdk-gen/c/README.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ Compiling from source
5858
---------------------
5959

6060
To build, simply type "make" in the libxenserver/src directory.
61-
To build on Windows with cygwin type "make CYGWIN=1".

ocaml/sdk-gen/c/templates/Makefile.mustache

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
DESTDIR=/usr/local
3131

32-
ifeq ($(CYGWIN), 1)
32+
UNAME_S := $(shell uname -s)
33+
34+
ifeq ($(findstring CYGWIN,$(UNAME_S)),CYGWIN)
3335
CYGWIN_LIBXML = -L/bin -lxml2-2
3436
POS_FLAG = -U__STRICT_ANSI__
3537
else
@@ -80,7 +82,7 @@ install: build
8082
$(INSTALL_DATA) libxenserver.so.{{API_VERSION_MAJOR}}.{{API_VERSION_MINOR}} $(DESTDIR)/lib
8183
ln -sf libxenserver.so.{{API_VERSION_MAJOR}}.{{API_VERSION_MINOR}} $(DESTDIR)/lib/libxenserver.so.{{API_VERSION_MAJOR}}
8284
ln -sf libxenserver.so.{{API_VERSION_MAJOR}} $(DESTDIR)/lib/libxenserver.so
83-
ifeq ($(CYGWIN), 1)
85+
ifeq ($(findstring CYGWIN,$(UNAME_S)),CYGWIN)
8486
ln -sf libxenserver.so $(DESTDIR)/lib/libxenserver.dll
8587
endif
8688
$(INSTALL_DATA) libxenserver.a $(DESTDIR)/lib

0 commit comments

Comments
 (0)