summaryrefslogtreecommitdiff
path: root/doc/bugs/fix_for_makefile_to_check_if_OS_is_linux_or_not___40__relates_to_the_new_inotify_flag__41__.mdwn
blob: fee00855eb3a916ecbcd27f98e9d65e046629f12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Since the watch branch is now merged into master, it doesn't quite build cleanly on non-linux systems anymore. So here's a small change to the Makefile to work around the problem for now.

<pre>
From 707cb47744775c324060febe11987db5f10ed9ff Mon Sep 17 00:00:00 2001
From: Jimmy Tang <jtang@tchpc.tcd.ie>
Date: Mon, 18 Jun 2012 09:20:35 +0100
Subject: [PATCH] Teach _Makefile_ to only do _-DWITH_INOTIFY_ when on a Linux
 machine.

---
 Makefile |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6d36e8b..8884b5c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,12 @@
+OS:=$(shell uname | sed 's/[-_].*//')
+
+ifeq ($(OS),Linux)
+BASEFLAGS_OPTS+=-DWITH_INOTIFY
+endif
+
 PREFIX=/usr
 IGNORE=-ignore-package monads-fd -ignore-package monads-tf
-BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -DWITH_S3 -DWITH_INOTIFY
+BASEFLAGS=-Wall $(IGNORE) -outputdir tmp -IUtility -DWITH_S3 $(BASEFLAGS_OPTS)
 GHCFLAGS=-O2 $(BASEFLAGS)
 
 ifdef PROFILE
-- 
1.7.10.4
</pre>

[[done]], thanks --[[Joey]]