/[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 1194 by ph10, Wed Oct 31 17:42:29 2012 UTC
# Line 36  dist_html_DATA = \ Line 36  dist_html_DATA = \
36    doc/html/pcre_get_stringtable_entries.html \    doc/html/pcre_get_stringtable_entries.html \
37    doc/html/pcre_get_substring.html \    doc/html/pcre_get_substring.html \
38    doc/html/pcre_get_substring_list.html \    doc/html/pcre_get_substring_list.html \
39      doc/html/pcre_jit_exec.html \
40    doc/html/pcre_jit_stack_alloc.html \    doc/html/pcre_jit_stack_alloc.html \
41    doc/html/pcre_jit_stack_free.html \    doc/html/pcre_jit_stack_free.html \
42    doc/html/pcre_maketables.html \    doc/html/pcre_maketables.html \
# Line 132  EXTRA_DIST += \ Line 133  EXTRA_DIST += \
133    pcre.h.generic \    pcre.h.generic \
134    config.h.generic    config.h.generic
135    
136  pcre.h.generic: configure.ac  # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
137    # version number. Therefore, we can create the generic version just by copying.
138    pcre.h.generic: pcre.h.in configure.ac
139          rm -f $@          rm -f $@
140          cp -p pcre.h $@          cp -p pcre.h $@
141    
142  MAINTAINERCLEANFILES += pcre.h.generic  # It is more complicated for config.h.generic. We need the version that results
143    # from a default configuration. We can get this by doing a configure in a
144    # temporary directory. It has to be entirely done using files in that
145    # directory, because the source directory may already be configured. If you
146    # just try running configure in a new directory, it complains that the source
147    # directory is already configured.
148    config.h.generic: configure.ac
149            rm -rf $@ _generic
150            mkdir _generic
151            cs=$(srcdir)/config.status; test ! -f $$cs || mv -f $$cs $$cs.aside
152            cd _generic && $(abs_top_srcdir)/configure || :
153            cs=$(srcdir)/config.status; test ! -f $$cs.aside || mv -f $$cs.aside $$cs
154            test -f _generic/config.h
155            perl -pe 'if(/^#define\s(?!PACKAGE)(\w+)/){print"#ifndef $$1\n$$_#endif\n";$$_="";}' _generic/config.h >$@
156            rm -rf _generic
157    
158    MAINTAINERCLEANFILES += pcre.h.generic config.h.generic
159    
160  # 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
161  # it is generated from pcre.h.in.  # it is generated from pcre.h.in.
# Line 645  dist_man_MANS = \ Line 664  dist_man_MANS = \
664    doc/pcre_get_stringtable_entries.3 \    doc/pcre_get_stringtable_entries.3 \
665    doc/pcre_get_substring.3 \    doc/pcre_get_substring.3 \
666    doc/pcre_get_substring_list.3 \    doc/pcre_get_substring_list.3 \
667      doc/pcre_jit_exec.3 \
668    doc/pcre_jit_stack_alloc.3 \    doc/pcre_jit_stack_alloc.3 \
669    doc/pcre_jit_stack_free.3 \    doc/pcre_jit_stack_free.3 \
670    doc/pcre_maketables.3 \    doc/pcre_maketables.3 \
# Line 692  install-data-hook: Line 712  install-data-hook:
712          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre16_get_stringtable_entries.3
713          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre16_get_substring.3
714          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre16_get_substring_list.3
715            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre16_jit_exec.3
716          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre16_jit_stack_alloc.3
717          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre16_jit_stack_free.3
718          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre16_maketables.3          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre16_maketables.3
# Line 717  install-data-hook: Line 738  install-data-hook:
738          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3          ln -sf pcre_get_stringtable_entries.3    $(DESTDIR)$(man3dir)/pcre32_get_stringtable_entries.3
739          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3          ln -sf pcre_get_substring.3              $(DESTDIR)$(man3dir)/pcre32_get_substring.3
740          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3          ln -sf pcre_get_substring_list.3         $(DESTDIR)$(man3dir)/pcre32_get_substring_list.3
741            ln -sf pcre_jit_exec.3                   $(DESTDIR)$(man3dir)/pcre32_jit_exec.3
742          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3          ln -sf pcre_jit_stack_alloc.3            $(DESTDIR)$(man3dir)/pcre32_jit_stack_alloc.3
743          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3          ln -sf pcre_jit_stack_free.3             $(DESTDIR)$(man3dir)/pcre32_jit_stack_free.3
744          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre32_maketables.3          ln -sf pcre_maketables.3                 $(DESTDIR)$(man3dir)/pcre32_maketables.3
# Line 737  endif Line 759  endif
759    
760  if WITH_GCOV  if WITH_GCOV
761    
762  GCOV_NAME = $(PACKAGE)-$(VERSION)  # Coverage reporting targets:
763  GCOV_OUTPUT_FILE = $(GCOV_NAME)-coverage.info  #
764  GCOV_OUTPUT_DIR = $(GCOV_NAME)-coverage  # coverage: Create a coverage report from 'make check'
765  GCOV_LCOV_FLAGS =  # coverage-baseline: Capture baseline coverage information
766  GCOV_GENHTML_FLAGS =  # coverage-reset: This zeros the coverage counters only
767    # coverage-report: This creates the coverage report only
768  gcov_quiet = $(gcov_quiet_$(V))  # coverage-clean-report: This removes the generated coverage report
769  gcov_quiet_ = $(gcov_quiet_$(AM_DEFAULT_VERBOSITY))  #   without cleaning the coverage data itself
770  gcov_quiet_0 = --quiet  # coverage-clean-data: This removes the captured coverage data without
771    #   removing the coverage files created at compile time (*.gcno)
772    # coverage-clean: This cleans all coverage data including the generated
773    #   coverage report.
774    
775    COVERAGE_TEST_NAME = $(PACKAGE)
776    COVERAGE_NAME = $(PACKAGE)-$(VERSION)
777    COVERAGE_OUTPUT_FILE = $(COVERAGE_NAME)-coverage.info
778    COVERAGE_OUTPUT_DIR = $(COVERAGE_NAME)-coverage
779    COVERAGE_LCOV_EXTRA_FLAGS =
780    COVERAGE_GENHTML_EXTRA_FLAGS =
781    
782    coverage_quiet = $(coverage_quiet_$(V))
783    coverage_quiet_ = $(coverage_quiet_$(AM_DEFAULT_VERBOSITY))
784    coverage_quiet_0 = --quiet
785    
786  coverage-check: all  coverage-check: all
787          -$(MAKE) $(AM_MAKEFLAGS) -k check          -$(MAKE) $(AM_MAKEFLAGS) -k check
788    
789    coverage-baseline:
790            $(LCOV) $(coverage_quiet) \
791                    --directory $(top_builddir) \
792                    --output-file "$(COVERAGE_OUTPUT_FILE)" \
793                    --capture \
794                    --initial
795    
796  coverage-report:  coverage-report:
797          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
798                  --directory $(top_builddir) \                  --directory $(top_builddir) \
799                  --capture \                  --capture \
800                  --output-file "$(GCOV_OUTPUT_FILE).tmp" \                  --output-file "$(COVERAGE_OUTPUT_FILE).tmp" \
801                  --test-name "$(GCOV_NAME)" \                  --test-name "$(COVERAGE_TEST_NAME)" \
802                  --no-checksum \                  --no-checksum \
803                  --compat-libtool \                  --compat-libtool \
804                  $(GCOV_LCOV_FLAGS)                  $(COVERAGE_LCOV_EXTRA_FLAGS)
805          $(LCOV) $(gcov_quiet) \          $(LCOV) $(coverage_quiet) \
806                  --directory $(top_builddir) \                  --directory $(top_builddir) \
807                  --output-file "$(GCOV_OUTPUT_FILE)" \                  --output-file "$(COVERAGE_OUTPUT_FILE)" \
808                  --remove "$(GCOV_OUTPUT_FILE).tmp" \                  --remove "$(COVERAGE_OUTPUT_FILE).tmp" \
809                  "/tmp/*" \                  "/tmp/*" \
810                  "/usr/include/*" \                  "/usr/include/*" \
811                  "$(includedir)/*"                  "$(includedir)/*"
812          -@rm -f "$(GCOV_OUTPUT_FILE).tmp"          -@rm -f "$(COVERAGE_OUTPUT_FILE).tmp"
813          LANG=C $(GENHTML) $(gcov_quiet) \          LANG=C $(GENHTML) $(coverage_quiet) \
814                  --prefix $(top_builddir) \                  --prefix $(top_builddir) \
815                  --output-directory "$(GCOV_OUTPUT_DIR)" \                  --output-directory "$(COVERAGE_OUTPUT_DIR)" \
816                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \                  --title "$(PACKAGE) $(VERSION) Code Coverage Report" \
817                  --show-details "$(GCOV_OUTPUT_FILE)" \                  --show-details "$(COVERAGE_OUTPUT_FILE)" \
818                  --legend \                  --legend \
819                  $(GCOV_GENHTML_FLAGS)                  $(COVERAGE_GENHTML_EXTRA_FLAGS)
820          @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"
821    
822  coverage-clean:  coverage-reset:
823          -$(LCOV) $(gcov_quiet) --zerocounters --directory $(top_builddir)          -$(LCOV) $(coverage_quiet) --zerocounters --directory $(top_builddir)
         -rm -f "$(GCOV_OUTPUT_FILE)"  
         -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-report:
826            -rm -f "$(COVERAGE_OUTPUT_FILE)" "$(COVERAGE_OUTPUT_FILE).tmp"
827            -rm -rf "$(COVERAGE_OUTPUT_DIR)"
828    
829    coverage-clean-data:
830            -find $(top_builddir) -name "*.gcda" -delete
831    
832    coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
833            -find $(top_builddir) -name "*.gcno" -delete
834    
835    coverage-distclean: coverage-clean
836    
837    coverage: coverage-reset coverage-baseline coverage-check coverage-report
838  clean-local: coverage-clean  clean-local: coverage-clean
839  distclean-local: coverage-clean  distclean-local: coverage-distclean
840    
841    .PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean
842    
843  else  else
844    

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

  ViewVC Help
Powered by ViewVC 1.1.5