build: fix order of rpath
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 12 May 2014 02:22:25 +0000 (21:22 -0500)
committerDavid Bremner <david@tethera.net>
Wed, 28 May 2014 12:50:04 +0000 (09:50 -0300)
commit90f9a5e65e8dab3fad0a60530d3ffc582f1b1a93
treec0c9c6f970ae13d8d6b043e1032a7d62975c141d
parent175144f6ad313527e1dfb45b6decedc26d569917
build: fix order of rpath

In my system `pkg-config --libs talloc` returns
'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
LDFLAGS to be something like '-Wl,-rpath,/usr/lib
-Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
'/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
RUNPATH.

I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
the database after I updated the system (which updated the system's
notmuch). This shouldn't happen.

Let's move the RUNPATH flags before other external flags have a chance of
screwing the build.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Makefile.local