[gjs: 1/5] build: Specify code coverage flags correctly
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/5] build: Specify code coverage flags correctly
- Date: Sat, 31 Mar 2018 00:34:33 +0000 (UTC)
commit eb041ee9ff63f9f89e7391c70e76264c2b8f7a32
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Feb 4 09:56:42 2018 -0800
build: Specify code coverage flags correctly
This uses CODE_COVERAGE_LIBS instead of CODE_COVERAGE_LDFLAGS; the two
are equivalent but CODE_COVERAGE_LDFLAGS is from an older version of the
code coverage macro and discouraged.
Also uses CODE_COVERAGE_CXXFLAGS for C++ compilation.
In some cases the flags weren't being passed to all compilations because
AM_*FLAGS is not used by default if there are per-target flags.
Makefile-test.am | 2 +-
Makefile.am | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index bf9665c3..116c902a 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -101,7 +101,7 @@ minijasmine_LDADD = $(GJS_LIBS) libgjs.la
### TEST GIRS ##########################################################
TEST_INTROSPECTION_GIRS =
-common_test_ldflags = -avoid-version
+common_test_ldflags = $(AM_LDFLAGS) -avoid-version
common_test_libadd = $(GJS_LIBS)
if !BUILDOPT_INSTALL_TESTS
diff --git a/Makefile.am b/Makefile.am
index 2f66cf36..7b5d53ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,9 +17,10 @@ check_LTLIBRARIES =
INTROSPECTION_GIRS =
## ACLOCAL_AMFLAGS can be removed for Automake 1.13
ACLOCAL_AMFLAGS = -I m4
-AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CFLAGS)
+AM_CFLAGS = $(WARN_CFLAGS) $(CODE_COVERAGE_CFLAGS)
+AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gjs\" $(CODE_COVERAGE_CPPFLAGS)
-AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LIBS)
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
@@ -66,6 +67,7 @@ libgjs_la_CPPFLAGS = \
-I$(top_srcdir)/gi \
-DGJS_COMPILATION
libgjs_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
-export-symbols-regex "^[^_]" \
-version-info 0:0:0 \
$(NO_UNDEFINED_FLAG) \
@@ -153,7 +155,7 @@ gjs_console_CPPFLAGS = \
gjs_console_LDADD = \
$(GJS_CONSOLE_LIBS) \
libgjs.la
-gjs_console_LDFLAGS = -rdynamic
+gjs_console_LDFLAGS = $(AM_LDFLAGS) -rdynamic
gjs_console_SOURCES = $(gjs_console_srcs)
install-exec-hook:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]