From 3d4db6f99f086711d2865a2a19639e417a97a21c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 9 Dec 2016 09:31:58 +0100 Subject: [PATCH] Define AM_CFLAGS inside the Makefile.am files themselves. Trying to include AM_CFLAGS through a configure generated rpm.am file doesn't really work because at the time automake runs configure doesn't exist yet to process rpm.am.in. Just define the AM_CFLAGS substitution inside the Makefile.am files themselves. Rename rpm.am.in back to rpm.am. Signed-off-by: Mark Wielaard --- Makefile.am | 1 + build/Makefile.am | 1 + configure.ac | 2 +- fileattrs/Makefile.am | 1 + lib/Makefile.am | 1 + plugins/Makefile.am | 1 + python/Makefile.am | 1 + rpm.am.in => rpm.am | 2 -- rpmio/Makefile.am | 1 + scripts/Makefile.am | 1 + sign/Makefile.am | 1 + tests/Makefile.am | 1 + 12 files changed, 11 insertions(+), 3 deletions(-) rename rpm.am.in => rpm.am (92%) diff --git a/Makefile.am b/Makefile.am index 47bb4bd119..eef2376520 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = --with-external-db include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ CLEANFILES = EXTRA_DIST = ChangeLog CREDITS INSTALL \ diff --git a/build/Makefile.am b/build/Makefile.am index f0f55a9602..2fa3c3d6c1 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpmbuild library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@ diff --git a/configure.ac b/configure.ac index e08096dc17..4f3be87703 100644 --- a/configure.ac +++ b/configure.ac @@ -892,7 +892,7 @@ AC_PATH_PROG(AUTOM4TE,autom4te,:) AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp]) -AC_CONFIG_FILES([Makefile rpm.am +AC_CONFIG_FILES([Makefile rpmio/Makefile lib/Makefile build/Makefile sign/Makefile po/Makefile.in scripts/Makefile fileattrs/Makefile misc/Makefile diff --git a/fileattrs/Makefile.am b/fileattrs/Makefile.am index 9c55aa111e..1895f4426b 100644 --- a/fileattrs/Makefile.am +++ b/fileattrs/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm file attributes include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ fattrsdir = $(rpmconfigdir)/fileattrs diff --git a/lib/Makefile.am b/lib/Makefile.am index 7fd6f94e15..c95d674f93 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@ diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 5ddc174bf8..98eb154d24 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += -I$(top_srcdir)/misc diff --git a/python/Makefile.am b/python/Makefile.am index cae66f08fc..af8b0897ff 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py diff --git a/rpm.am.in b/rpm.am similarity index 92% rename from rpm.am.in rename to rpm.am index c91bebf610..1f43ad8a0b 100644 --- a/rpm.am.in +++ b/rpm.am @@ -8,5 +8,3 @@ rpmconfigdir = $(prefix)/lib/rpm # Libtool version (current-revision-age) for all our libraries rpm_version_info = 7:0:0 - -AM_CFLAGS = @RPMCFLAGS@ diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index 68a8219346..5ad4d6818e 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += @WITH_NSS_INCLUDE@ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index f204c51e1e..b1360e1929 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm scripts. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ CLEANFILES = diff --git a/sign/Makefile.am b/sign/Makefile.am index 86314ff628..e6129811ac 100644 --- a/sign/Makefile.am +++ b/sign/Makefile.am @@ -1,6 +1,7 @@ # Makefile for rpm library. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@ diff --git a/tests/Makefile.am b/tests/Makefile.am index 5b4c058a68..7091220463 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,7 @@ ## Process this file with automake to produce Makefile.in. include $(top_srcdir)/rpm.am +AM_CFLAGS = @RPMCFLAGS@ EXTRA_DIST = CLEANFILES =