build: Use ostree_prepare_root_CPPFLAGS for ostree-prepare-root
authorAlex Kiernan <alex.kiernan@gmail.com>
Wed, 4 Jul 2018 19:19:41 +0000 (19:19 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 4 Jul 2018 19:45:50 +0000 (19:45 +0000)
Swap from AM_CPPFLAGS to ostree_prepare_root_CPPFLAGS when compiling
ostree-prepare-root statically. This fixes a problem when you have
systemd and libmount, but only ostree_prepare_root_CPPFLAGS includes
-DHAVE_SYSTEMD_AND_LIBMOUNT=1.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Closes: #1670
Approved by: jlebon

Makefile-switchroot.am

index 8a8ec570f1e4f64728703bbd88a2aa8c6ea7c842..4423fdcd0dde2fabc684777a64ce9237955b7550 100644 (file)
@@ -45,7 +45,7 @@ if BUILDOPT_USE_STATIC_COMPILER
 ostree_boot_SCRIPTS = ostree-prepare-root
 
 ostree-prepare-root : $(ostree_prepare_root_SOURCES)
-       $(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(AM_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES)
+       $(STATIC_COMPILER) -o $@ -static $(top_srcdir)/src/switchroot/ostree-prepare-root.c $(ostree_prepare_root_CPPFLAGS) $(AM_CFLAGS) $(DEFAULT_INCLUDES)
 else
 ostree_boot_PROGRAMS += ostree-prepare-root
 ostree_prepare_root_CFLAGS = $(AM_CFLAGS) -Isrc/switchroot