[gnome-battery-bench] automake: factor out common cpp flags



commit 7a73b0abeb5aaa0b8cece805b480e53b7ab4d718
Author: Christian Kellner <gicmo gnome org>
Date:   Wed May 3 14:43:20 2017 +0200

    automake: factor out common cpp flags

 src/Makefile.am |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 252cf84..ce6227c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,12 @@
+NULL =
+
 EXTRA_DIST = integration-test
 
+AM_CPPFLAGS =                                                  \
+       -DPKGDATADIR=\"$(pkgdatadir)\"                          \
+       -DDATADIR=\"$(datadir)\"                                \
+       $(NULL)
+
 bin_PROGRAMS=gnome-battery-bench gbb
 libexec_PROGRAMS=gnome-battery-bench-helper
 
@@ -38,7 +45,7 @@ client_sources =                              \
        xinput-wait.c                           \
        xinput-wait.h
 
-gnome_battery_bench_CPPFLAGS = $(APPLICATION_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\" -DDATADIR=\"$(datadir)\"
+gnome_battery_bench_CPPFLAGS =  $(AM_CPPFLAGS) $(APPLICATION_CFLAGS)
 gnome_battery_bench_LDADD = $(APPLICATION_LIBS)
 
 gnome_battery_bench_SOURCES =                  \
@@ -52,14 +59,14 @@ gnome_battery_bench_SOURCES =                       \
        util-gtk.h                              \
        gnome-battery-bench.gresource.c
 
-gbb_CPPFLAGS = $(COMMANDLINE_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\" -DDATADIR=\"$(datadir)\"
+gbb_CPPFLAGS =  $(AM_CPPFLAGS) $(COMMANDLINE_CFLAGS)
 gbb_LDADD = $(COMMANDLINE_LIBS)
 
 gbb_SOURCES =                                  \
        $(client_sources)                       \
        commandline.c
 
-gnome_battery_bench_helper_CPPFLAGS = $(HELPER_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\"
+gnome_battery_bench_helper_CPPFLAGS =  $(AM_CPPFLAGS) $(HELPER_CFLAGS)
 gnome_battery_bench_helper_LDADD = $(HELPER_LIBS)
 
 gnome_battery_bench_helper_SOURCES =           \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]