[kbd] [PATCH 1/3] fix various vlock build errors

Mike Frysinger vapier at gentoo.org
Mon Dec 3 01:16:44 MSK 2012


The current code assumes the build is done in-tree and sets up -I paths
according to that.  As such, out-of-tree builds fail.  Fix AM_CPPFLAGS
to work in either case.

No build system should hardcode optimization/pipe flags.  So delete that
AM_CFLAGS line and let the configure/user build settings work.

Finally, EXTRA_DIST should not be conditional.  Otherwise, the configure
flags will impact the tarball created by `make distcheck`.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 src/vlock/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/vlock/Makefile.am b/src/vlock/Makefile.am
index 3f074f4..fa9f5be 100644
--- a/src/vlock/Makefile.am
+++ b/src/vlock/Makefile.am
@@ -1,9 +1,9 @@
-AM_CPPFLAGS = -I.. -D_GNU_SOURCE -DLOCALEDIR=\"$(localedir)\"
-AM_CFLAGS = -pipe -O2
+AM_CPPFLAGS = -I$(srcdir)/.. -I$(builddir)/.. -D_GNU_SOURCE -DLOCALEDIR=\"$(localedir)\"
+
+EXTRA_DIST = README.vlock
 
 if VLOCK
 bin_PROGRAMS = vlock
-EXTRA_DIST = README.vlock
 endif
 
 vlock_SOURCES  = \
-- 
1.7.12.4



More information about the kbd mailing list