]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Consolidate list of custom phony targets
authorMichael Pratt <mcpratt@pm.me>
Sun, 24 Nov 2024 19:03:58 +0000 (19:03 +0000)
committerAaron Merey <amerey@redhat.com>
Fri, 10 Jan 2025 16:01:00 +0000 (11:01 -0500)
Having a target defined as phony within a condition
while another target is always defined as phony
causes an automake warning:

  Makefile.am:67: warning: .PHONY was already defined in condition TRUE, which includes condition GCOV ...
  config/eu.am:141: ... '.PHONY' previously defined here
  Makefile.am:21:   'config/eu.am' included from here
  tests/Makefile.am:895: warning: .PHONY was already defined in condition TRUE, which includes condition GCOV ...
  config/eu.am:141: ... '.PHONY' previously defined here
  tests/Makefile.am:19:   'config/eu.am' included from here

Instead, list all the custom targets that are phony
in the common definitions in the eu.am file.

Since it is all related to coverage at this moment,
the list can be grouped as it is instead of moved or split.

    * Makefile.am: remove .PHONY list in conditional
    * config/eu.am: add coverage target to .PHONY list
    * tests/Makefile.am: remove .PHONY list in conditional

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Makefile.am
config/eu.am
tests/Makefile.am

index e44bbe620faf26922e5570d225b8fe3f049112b4..3a181d75e1ec330e096c68187f13e160658c839f 100644 (file)
@@ -64,7 +64,6 @@ build_COVERAGE_DIRS = $(patsubst %,$(builddir)/%,$(COVERAGE_DIRS))
 all_COVERAGE_DIRS = $(sort $(src_COVERAGE_DIRS) $(build_COVERAGE_DIRS))
 LCOV_DIRS_ARGS = $(patsubst %,--directory=%,$(all_COVERAGE_DIRS))
 
-.PHONY: coverage
 coverage: $(COVERAGE_OUTPUT_INDEX_HTML)
        @echo 'file://$(abs_builddir)/$(COVERAGE_OUTPUT_INDEX_HTML)'
 
index 475d5836b1df524f885d9a5c859141bad48db380..e4fcbd1aa9b495856c32c2448e53cdd6e13e8dca 100644 (file)
@@ -138,7 +138,8 @@ endif
 COVERAGE_OUTPUT_DIRECTORY = coverage
 COVERAGE_OUTPUT_FILE = $(PACKAGE_NAME).lcov
 
-.PHONY: clean-coverage
+.PHONY: clean-coverage coverage
+
 clean-local: clean-coverage
 clean-coverage:
        -rm -rf $(COVERAGE_OUTPUT_DIRECTORY)
index 44cbb8258e7047f285d01e8ebe426bbc7ff1813d..8f08779825bb4f76bb454fa96eb01c7ecb10a072 100644 (file)
@@ -892,7 +892,6 @@ CLEANFILES = $(BUILT_SOURCES)
 
 if GCOV
 check: check-am coverage
-.PHONY: coverage
 coverage:
        -$(srcdir)/coverage.sh
 endif