Commit eb041ee9 authored by Philip Chimento's avatar Philip Chimento 🚮

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.
parent 74ad71bf
......@@ -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
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment