btrfs-progs: build: set include path relatively
authorNaohiro Aota <naota@elisp.net>
Thu, 12 Oct 2017 02:22:24 +0000 (11:22 +0900)
committerDavid Sterba <dsterba@suse.com>
Fri, 13 Oct 2017 18:16:01 +0000 (20:16 +0200)
commit0792c170282f4b94bb2ffce483a5294d56eb8036
tree91eb78351c52b2bde3e3d24780019bfb546a764a
parentaafb4593feeb4fc55644416c620d0caff2c141d5
btrfs-progs: build: set include path relatively

Currently, gcc is passed the include directory with full path. As a result,
dependency files (*.o.d) also record the full path at the build time. Such
full path dependency is annoying for sharing the source between multiple
machines, containers, or anything the path differ.

And this is the same way what other program using autotools e.g. e2fsprogs
is doing:

$ grep top_builddir Makefile
top_builddir = .
CPPFLAGS = -I. -I$(top_builddir)/lib -I$(top_srcdir)/lib
BUILD_CFLAGS = -g -O2  -I. -I$(top_builddir)/lib -I$(top_srcdir)/lib -DHAVE_CONFIG_H
<snip>

Signed-off-by: Naohiro Aota <naota@elisp.net>
[ set TOPDIR=. instead of -I as discussed, does not harm linker ]
Signed-off-by: David Sterba <dsterba@suse.com>
Makefile