[PATCH xorg-gtest] Fix build system.

Jussi Pakkanen jussi.pakkanen at canonical.com
Wed Feb 1 06:23:12 PST 2012


Currently the code builds only if the headers and libs happen
to be in the system paths already. Fix that.

Signed-off-by: Jussi Pakkanen <jussi.pakkanen at canonical.com>
---
 Makefile.am          |   13 ++++++++++++-
 configure.ac         |    2 +-
 examples/Makefile.am |   29 -----------------------------
 3 files changed, 13 insertions(+), 31 deletions(-)
 delete mode 100644 examples/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index d10bca8..82496bf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = doc examples
+SUBDIRS = doc
 
 lib_LTLIBRARIES = libxorg-gtest.la libxorg-gtest_main.la
 
@@ -38,6 +38,17 @@ ACLOCAL_AMFLAGS = -I m4
 
 AM_CXXFLAGS = -Iinclude
 
+noinst_PROGRAMS = xorg-gtest-example
+
+xorg_gtest_example_SOURCES = examples/xorg-gtest.cpp
+
+xorg_gtest_example_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
+	$(GTEST_CPPFLAGS) \
+	-Iinclude
+
+xorg_gtest_example_LDFLAGS = libxorg-gtest.la libxorg-gtest_main.la -lgtest -lpthread -lX11
+
 .PHONY: ChangeLog INSTALL
 INSTALL:
 	$(INSTALL_CMD)
diff --git a/configure.ac b/configure.ac
index 9d7b36b..e1860d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ m4_include([m4/gtest.m4])
 # Initialize Automake
 AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
 AM_SILENT_RULES([yes])
-AM_MAINTAINER_MODE
+AM_MAINTAINER_MODE([enable])
 
 LIB_VERSION=0:0:0
 AC_SUBST([LIB_VERSION])
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index 0bc8272..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# @file examples/Makefile.am 
-# @brief automake recipe for the xorg-gtest examples
-#
-# Copyright 2011 Canonical, Ltd.
-#
-# This file is part of the utouch-geis library. This library is free software;
-# you can redistribute it and/or modify it under the terms of the GNU Lesser
-# General Public License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-noinst_PROGRAMS = xorg-gtest-example
-
-xorg_gtest_example_SOURCES = xorg-gtest.cpp
-
-xorg_gtest_example_CPPFLAGS = \
-	$(AM_CPPFLAGS) \
-	$(GTEST_CPPFLAGS)
-
-xorg_gtest_example_LDFLAGS = -lxorg-gtest -lxorg-gtest_main -lgtest -lpthread -lX11
-- 
1.7.8.3



More information about the xorg-devel mailing list