From 3c2533e3378d1b22c4547aac09eafef4f5364e4b Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Wed, 21 Mar 2012 14:10:22 +0100 Subject: [PATCH] Makefile.am-s: allow building outside of the source tree Hi, I saw your announcement about kconfig-frontends to uclibc@uclibc.org the other day, and thought I would try it out for our own project where we use an old derivative of the kconfig system. However, to make it build with our build system I needed to apply the patch below to allow building outside the source tree. After that all worked fine, and the generated .config file is still the same as with the old config system. :) [--SNIP unrelated message--] Signed-off-by: Peter Kjellerstedt --- frontends/conf/Makefile.am | 4 ++-- frontends/gconf/Makefile.am | 6 +++--- frontends/mconf/Makefile.am | 8 ++++---- frontends/nconf/Makefile.am | 4 ++-- frontends/qconf/Makefile.am | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontends/conf/Makefile.am b/frontends/conf/Makefile.am index bb5d5b6..9b464cc 100644 --- a/frontends/conf/Makefile.am +++ b/frontends/conf/Makefile.am @@ -3,6 +3,6 @@ bin_PROGRAMS = conf conf_SOURCES = conf.c conf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ - -I../../libs/parser -conf_LDADD = ../../libs/parser/libkconfigparser.la \ + -I$(top_srcdir)/libs/parser +conf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ $(conf_EXTRA_LIBS) diff --git a/frontends/gconf/Makefile.am b/frontends/gconf/Makefile.am index d37b692..0edd622 100644 --- a/frontends/gconf/Makefile.am +++ b/frontends/gconf/Makefile.am @@ -3,12 +3,12 @@ bin_PROGRAMS = gconf gconf_SOURCES = gconf.c gconf.glade gconf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ - -I../../libs/parser \ - -I../../libs/images \ + -I$(top_srcdir)/libs/parser \ + -I$(top_srcdir)/libs/images \ -DGUI_PATH='"$(pkgdatadir)/gconf.glade"' gconf_CFLAGS = $(AM_CFLAGS) \ $(gtk_CFLAGS) -gconf_LDADD = ../../libs/parser/libkconfigparser.la \ +gconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ $(gtk_LIBS) $(gconf_EXTRA_LIBS) gconfdir = $(pkgdatadir) gconf_DATA = gconf.glade diff --git a/frontends/mconf/Makefile.am b/frontends/mconf/Makefile.am index f33426f..9219d0d 100644 --- a/frontends/mconf/Makefile.am +++ b/frontends/mconf/Makefile.am @@ -4,8 +4,8 @@ mconf_SOURCES = mconf.c mconf_CPPFLAGS = $(AM_CPPFLAGS) \ -DCURSES_LOC='"$(CURSES_LOC)"' \ $(GETTEXT) \ - -I../../libs \ - -I../../libs/parser -mconf_LDADD = ../../libs/parser/libkconfigparser.la \ - ../../libs/lxdialog/liblxdialog.a \ + -I$(top_srcdir)/libs \ + -I$(top_srcdir)/libs/parser +mconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ + $(top_builddir)/libs/lxdialog/liblxdialog.a \ $(ncurses_LIBS) $(mconf_EXTRA_LIBS) diff --git a/frontends/nconf/Makefile.am b/frontends/nconf/Makefile.am index fe437fb..241912c 100644 --- a/frontends/nconf/Makefile.am +++ b/frontends/nconf/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = nconf nconf_SOURCES = nconf.c nconf.gui.c nconf.h nconf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ - -I../../libs/parser -nconf_LDADD = ../../libs/parser/libkconfigparser.la \ + -I$(top_srcdir)/libs/parser +nconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ $(ncurses_extra_LIBS) $(ncurses_LIBS) \ $(nconf_EXTRA_LIBS) diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am index 33ea998..9946857 100644 --- a/frontends/qconf/Makefile.am +++ b/frontends/qconf/Makefile.am @@ -4,11 +4,11 @@ qconf_SOURCES = qconf.cc qconf.h BUILT_SOURCES = qconf.moc qconf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ - -I../../libs/parser \ - -I../../libs/images + -I$(top_srcdir)/libs/parser \ + -I$(top_srcdir)/libs/images qconf_CXXFLAGS = $(AM_CXXFLAGS) \ $(qt4_CFLAGS) -qconf_LDADD = ../../libs/parser/libkconfigparser.la \ +qconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ $(qt4_LIBS) $(qconf_EXTRA_LIBS) .h.moc: -- 2.39.2