3 # Copyright 2010, 2011, 2012 Ali Polatel <alip@exherbo.org>
4 # Distributed under the terms of the GNU General Public License v3
8 NOTDIR = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
9 NOTHDR = File.join(NOTDIR, 'notmuch.h')
10 NOTLIB = File.join(NOTDIR, 'libnotmuch.a')
12 unless File.exists? NOTHDR
13 $stderr.puts "notmuch.h is missing under #{NOTDIR}"
17 unless File.exists? NOTLIB
18 $stderr.puts "libnotmuch.a is missing under #{NOTDIR}"
22 # Small hack to build with in-tree version not the installed one.
23 # find_header() and friends use standard include/library paths first.
24 $stderr.puts "Added -I#{NOTDIR} to $INCFLAGS"
25 $INCFLAGS = "-I#{NOTDIR}".quote + " " + $INCFLAGS
26 find_header('notmuch.h', NOTDIR)
32 create_makefile('notmuch')