/[pcre]/code/trunk/Makefile.am
ViewVC logotype

Diff of /code/trunk/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1177 by ph10, Sat Oct 27 16:07:40 2012 UTC revision 1180 by chpe, Sat Oct 27 17:58:43 2012 UTC
# Line 755  endif Line 755  endif
755    
756  if WITH_GCOV  if WITH_GCOV
757    
758  GCOV_NAME = $(PACKAGE)-$(VERSION)  # Coverage reporting targets:
759  GCOV_OUTPUT_FILE = $(GCOV_NAME)-coverage.info  #
760  GCOV_OUTPUT_DIR = $(GCOV_NAME)-coverage  # coverage: Create a coverage report from 'make check'
761  GCOV_LCOV_FLAGS =  # coverage-baseline: Capture baseline coverage information
762  GCOV_GENHTML_FLAGS =  # coverage-reset: This zeros the coverage counters only
763    # coverage-report: This creates the coverage report only
764  gcov_quiet = $(gcov_quiet_$(V))  # coverage-clean-report: This removes the generated coverage report
765  gcov_quiet_ = $(gcov_quiet_$(AM_DEFAULT_VERBOSITY))  #   without cleaning the coverage data itself
766  gcov_quiet_0 = --quiet  # coverage-clean: This cleans all coverage data including the generated
767    #   coverage report.
768    
769    COVERAGE_TEST_NAME = $(PACKAGE)
770    COVERAGE_NAME = $(PACKAGE)-$(VERSION)
771    COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
772    COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
773    COVERAGE_LCOV_EXTRA_FLAGS =
774    COVERAGE_GENHTML_EXTRA_FLAGS =
775    
776    coverage_quiet = $(coverage_quiet_$(V))
777    coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
778    coverage_quiet_0 = --quiet
779    
780  coverage-check: all  coverage-check: all
781          -$(MAKE) $(AM_MAKEFLAGS) -k check          -$(MAKE) $(AM_MAKEFLAGS) -k check
782    
783    coverage-baseline:
784            $(LCOV) $(coverage_quiet) \
785                    --directory $(top_builddir) \
786                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
787                    --capture \
788                    --initial
789    
790  coverage-report:  coverage-report:
791          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
792                  --directory $(top_builddir) \                  --directory $(top_builddir) \
793                  --capture \                  --capture \
794                  --output-file "$(GCOV_OUTPUT_FILE).tmp" \                  --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
795                  --test-name "$(GCOV_NAME)" \                  --test-name "$(COVERAGE_TEST_NAME)" \
796                  --no-checksum \                  --no-checksum \
797                  --compat-libtool \                  --compat-libtool \
798                  $(GCOV_LCOV_FLAGS)                  $(COVERAGE_LCOV_EXTRA_FLAGS)
799          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
800                  --directory $(top_builddir) \                  --directory $(top_builddir) \
801                  --output-file "$(GCOV_OUTPUT_FILE)" \                  --output-file "$(COVERAGE_OUTPUT_FILE)" \
802                  --remove "$(GCOV_OUTPUT_FILE).tmp" \                  --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
803                  "/tmp/*" \                  "/tmp/*" \
804                  "/usr/include/*" \                  "/usr/include/*" \
805                  "$(includedir)/*"                  "$(includedir)/*"
806          -@rm -f "$(GCOV_OUTPUT_FILE).tmp"          -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
807          LANG=C $(GENHTML) $(gcov_quiet) \          LANG=C $(GENHTML) $(coverage_quiet) \
808                  --prefix $(top_builddir) \                  --prefix $(top_builddir) \
809                  --output-directory "$(GCOV_OUTPUT_DIR)" \                  --output-directory "$(COVERAGE_OUTPUT_DIR)" \
810                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
811                  --show-details "$(GCOV_OUTPUT_FILE)" \                  --show-details "$(COVERAGE_OUTPUT_FILE)" \
812                  --legend \                  --legend \
813                  $(GCOV_GENHTML_FLAGS)                  $(COVERAGE_GENHTML_EXTRA_FLAGS)
814          @echo "Code coverage report written to file://$(abs_builddir)/$(GCOV_OUTPUT_DIR)/index.html"          @echo "Code coverage report written to file://$(abs_builddir)/$(COVERAGE_OUTPUT_DIR)/index.html"
815    
816    coverage-reset:
817            -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
818    
819  coverage-clean:  coverage-clean-report:
820          -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)          -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
821          -rm -f "$(GCOV_OUTPUT_FILE)"          -rm -rf "$(COVERAGE_OUTPUT_DIR)"
         -rm -f "$(GCOV_OUTPUT_FILE).tmp"  
         -rm -rf "$(GCOV_NAME)"  
         -find $(top_builddir) -name '*.gcda' -o -name "*.gcov" -delete  
822    
823  coverage: coverage-check coverage-report  coverage-clean: coverage-reset coverage-clean-report
824            -find $(top_builddir) -name "*.gcda" -or -name "*.gcno" -delete
825    
826    coverage-distclean: coverage-clean
827    
828    coverage: coverage-baseline coverage-check coverage-report
829  clean-local: coverage-clean  clean-local: coverage-clean
830  distclean-local: coverage-clean  distclean-local: coverage-distclean
831    
832    .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean coverage-distclean
833    
834  else  else
835    

Legend:
Removed from v.1177  
changed lines
  Added in v.1180

  ViewVC Help
Powered by ViewVC 1.1.5