/[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 1165 by chpe, Tue Oct 23 11:17:28 2012 UTC revision 1181 by chpe, Sat Oct 27 18:04:36 2012 UTC
# Line 132  EXTRA_DIST += \ Line 132  EXTRA_DIST += \
132    pcre.h.generic \    pcre.h.generic \
133    config.h.generic    config.h.generic
134    
135  pcre.h.generic: configure.ac  # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
136    # version number. Therefore, we can create the generic version just by copying.
137    pcre.h.generic: pcre.h.in configure.ac
138          rm -f $@          rm -f $@
139          cp -p pcre.h $@          cp -p pcre.h $@
140    
141  MAINTAINERCLEANFILES += pcre.h.generic  # It is more complicated for config.h.generic. We need the version that results
142    # from a default configuration. We can get this by doing a configure in a
143    # temporary directory. It has to be entirely done using files in that
144    # directory, because the source directory may already be configured. If you
145    # just try running configure in a new directory, it complains that the source
146    # directory is already configured.
147    config.h.generic: configure.ac
148            rm -rf $@ _generic
149            mkdir _generic
150            cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
151            cd _generic && $(abs_top_srcdir)/configure || :
152            cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
153            test -f _generic/config.h
154            perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' _generic/config.h >$@
155            rm -rf _generic
156    
157    MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
158    
159  # These are the header files we'll install. We do not distribute pcre.h because  # These are the header files we'll install. We do not distribute pcre.h because
160  # it is generated from pcre.h.in.  # it is generated from pcre.h.in.
# Line 737  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-data: This removes the captured coverage data without
767    #   removing the coverage files created at compile time (*.gcno)
768    # coverage-clean: This cleans all coverage data including the generated
769    #   coverage report.
770    
771    COVERAGE_TEST_NAME = $(PACKAGE)
772    COVERAGE_NAME = $(PACKAGE)-$(VERSION)
773    COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
774    COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
775    COVERAGE_LCOV_EXTRA_FLAGS =
776    COVERAGE_GENHTML_EXTRA_FLAGS =
777    
778    coverage_quiet = $(coverage_quiet_$(V))
779    coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
780    coverage_quiet_0 = --quiet
781    
782  coverage-check: all  coverage-check: all
783          -$(MAKE) $(AM_MAKEFLAGS) -k check          -$(MAKE) $(AM_MAKEFLAGS) -k check
784    
785    coverage-baseline:
786            $(LCOV) $(coverage_quiet) \
787                    --directory $(top_builddir) \
788                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
789                    --capture \
790                    --initial
791    
792  coverage-report:  coverage-report:
793          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
794                  --directory $(top_builddir) \                  --directory $(top_builddir) \
795                  --capture \                  --capture \
796                  --output-file "$(GCOV_OUTPUT_FILE).tmp" \                  --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
797                  --test-name "$(GCOV_NAME)" \                  --test-name "$(COVERAGE_TEST_NAME)" \
798                  --no-checksum \                  --no-checksum \
799                  --compat-libtool \                  --compat-libtool \
800                  $(GCOV_LCOV_FLAGS)                  $(COVERAGE_LCOV_EXTRA_FLAGS)
801          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
802                  --directory $(top_builddir) \                  --directory $(top_builddir) \
803                  --output-file "$(GCOV_OUTPUT_FILE)" \                  --output-file "$(COVERAGE_OUTPUT_FILE)" \
804                  --remove "$(GCOV_OUTPUT_FILE).tmp" \                  --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
805                  "/tmp/*" \                  "/tmp/*" \
806                  "/usr/include/*" \                  "/usr/include/*" \
807                  "$(includedir)/*"                  "$(includedir)/*"
808          -@rm -f "$(GCOV_OUTPUT_FILE).tmp"          -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
809          LANG=C $(GENHTML) $(gcov_quiet) \          LANG=C $(GENHTML) $(coverage_quiet) \
810                  --prefix $(top_builddir) \                  --prefix $(top_builddir) \
811                  --output-directory "$(GCOV_OUTPUT_DIR)" \                  --output-directory "$(COVERAGE_OUTPUT_DIR)" \
812                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
813                  --show-details "$(GCOV_OUTPUT_FILE)" \                  --show-details "$(COVERAGE_OUTPUT_FILE)" \
814                  --legend \                  --legend \
815                  $(GCOV_GENHTML_FLAGS)                  $(COVERAGE_GENHTML_EXTRA_FLAGS)
816          @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"
817    
818    coverage-reset:
819            -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
820    
821  coverage-clean:  coverage-clean-report:
822          -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)          -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
823          -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  
824    
825  coverage: coverage-check coverage-report  coverage-clean-data:
826            -find $(top_builddir) -name "*.gcda" -delete
827    
828    coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
829            -find $(top_builddir) -name "*.gcno" -delete
830    
831    coverage-distclean: coverage-clean
832    
833    coverage: coverage-reset coverage-baseline coverage-check coverage-report
834  clean-local: coverage-clean  clean-local: coverage-clean
835  distclean-local: coverage-clean  distclean-local: coverage-distclean
836    
837    .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
838    
839  else  else
840    

Legend:
Removed from v.1165  
changed lines
  Added in v.1181

  ViewVC Help
Powered by ViewVC 1.1.5