aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2010-06-15 17:49:13 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2010-06-15 17:49:13 +0000
commitaebdeefa64b76db225e4bf23f4d07a8169a7c0c3 (patch)
tree69ebdbd65a9f333f18a2ce43e44392c88376abb3
parent6433d1b8cbd8c7befaf50922858632daf2b33c8f (diff)
* Fix out-of-source build.
-rw-r--r--ChangeLog4
-rw-r--r--util/.cvsignore1
-rw-r--r--util/Makefile.am13
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 083bce4..1cf821e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix out-of-source build. Patch by Jörg Faschingbauer
+
2010-05-10 Miklos Szeredi <miklos@szeredi.hu>
* Remove "chmod root" from install of fusermount. Reported by
diff --git a/util/.cvsignore b/util/.cvsignore
index 85b4a71..1f7f432 100644
--- a/util/.cvsignore
+++ b/util/.cvsignore
@@ -6,3 +6,4 @@ fusermount
ulockmgr_server
fuse_ioslave
mount.fuse
+mount_util.c
diff --git a/util/Makefile.am b/util/Makefile.am
index b9bcdaa..927b98c 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -4,9 +4,16 @@ AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64
bin_PROGRAMS = fusermount ulockmgr_server
noinst_PROGRAMS = mount.fuse
-fusermount_SOURCES = fusermount.c
-fusermount_LDADD = ../lib/mount_util.lo
-fusermount_CPPFLAGS = -I../lib
+# we re-use mount_util.c from the library, but do want to keep ourself
+# as stand-alone as possible. in order to make an out-of-source build
+# possible, we "generate" the file from its original location by
+# copying it over.
+fusermount_SOURCES = fusermount.c mount_util.c
+fusermount_CPPFLAGS = -I$(top_srcdir)/lib
+BUILT_SOURCES = mount_util.c
+mount_util.c: $(top_srcdir)/lib/mount_util.c
+ @cp $(top_srcdir)/lib/mount_util.c .
+
mount_fuse_SOURCES = mount.fuse.c
ulockmgr_server_SOURCES = ulockmgr_server.c