From: Ben Pfaff Date: Mon, 3 May 2010 04:00:06 +0000 (-0700) Subject: Take advantage of Gnulib configmake module. X-Git-Tag: sav-api~283 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=cef154921f6cdc07bc76edbe720036ab4c32bff8 Take advantage of Gnulib configmake module. Gnulib provides the "configmake" module for discovering configuration directories at build time. PSPP already depends on this module indirectly, so we might as well use it instead of defining our own variables in Makefile.am and src/automake.mk. (We can't replace INSTALLDIR by BINDIR because it is used under the former name by the "relocatable-prog" module.) --- diff --git a/Makefile.am b/Makefile.am index bebd2ab5ab..78790a431d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,8 +9,7 @@ BUILT_SOURCES = AM_CPPFLAGS = \ -I$(top_srcdir)/gl \ -I$(top_builddir)/gl \ - -DINSTALLDIR=\"$(bindir)\" \ - -DDOCDIR=\"$(docdir)\" + -DINSTALLDIR=\"$(bindir)\" AM_CFLAGS= diff --git a/Smake b/Smake index 7ee5585c5e..22c0f692de 100644 --- a/Smake +++ b/Smake @@ -10,6 +10,7 @@ GNULIB_MODULES = \ c-ctype \ c-strtod \ close \ + configmake \ count-one-bits \ crc \ crypto/md4 \ diff --git a/src/automake.mk b/src/automake.mk index 46e0ef7340..65806fd442 100644 --- a/src/automake.mk +++ b/src/automake.mk @@ -7,7 +7,7 @@ include $(top_srcdir)/src/data/automake.mk -AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib -DPKGDATADIR=\"$(pkgdatadir)\" +AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib lib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la diff --git a/src/libpspp/getl.c b/src/libpspp/getl.c index dc69f11a12..43d2a56f46 100644 --- a/src/libpspp/getl.c +++ b/src/libpspp/getl.c @@ -24,6 +24,7 @@ #include "libpspp/str.h" #include "libpspp/string-array.h" +#include "gl/configmake.h" #include "gl/relocatable.h" #include "gl/xalloc.h" diff --git a/src/ui/gui/about.c b/src/ui/gui/about.c index 85185b3931..5b606bf5ab 100644 --- a/src/ui/gui/about.c +++ b/src/ui/gui/about.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2006, 2007 Free Software Foundation + Copyright (C) 2006, 2007, 2010 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,6 +24,8 @@ #include "about.h" #include "helper.h" +#include "gl/configmake.h" + #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index a0d753b5d6..3be3981388 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -41,6 +41,7 @@ #include "psppire-data-store.h" +#include "gl/configmake.h" #include "xalloc.h" #include diff --git a/src/ui/gui/helper.h b/src/ui/gui/helper.h index 223b613447..671bb8edf6 100644 --- a/src/ui/gui/helper.h +++ b/src/ui/gui/helper.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2004, 2009 Free Software Foundation + Copyright (C) 2004, 2009, 2010 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,6 +27,8 @@ #include "psppire-dict.h" +#include "gl/configmake.h" + void paste_syntax_in_new_window (const gchar *syntax); struct fmt_spec; diff --git a/src/ui/gui/main.c b/src/ui/gui/main.c index e0e680f30b..7c952283a8 100644 --- a/src/ui/gui/main.c +++ b/src/ui/gui/main.c @@ -28,6 +28,7 @@ #include "libpspp/copyleft.h" #include "ui/source-init-opts.h" +#include "gl/configmake.h" #include "gl/progname.h" #include "gl/relocatable.h" #include "gl/xalloc.h" diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index e612691640..d75bff359b 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -56,6 +56,7 @@ #include "ui/source-init-opts.h" #include "ui/syntax-gen.h" +#include "gl/configmake.h" #include "gl/xalloc.h" #include "gl/relocatable.h"