Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ ACLOCAL_AMFLAGS = -I m4

AM_CPPFLAGS="-I$(srcdir)/src"

## Set some variables to accumulate conditionally-set Automake targets.

CLEAN_LOCAL_TARGETS=
DISTCLEAN_LOCAL_TARGETS=
PHONY_TARGETS=

## Specify the documentation files that are distributed.

dist_doc_DATA = \
Expand Down Expand Up @@ -851,13 +857,14 @@ CLEANFILES += \
testtrygrep \
testNinputgrep

clean-local: testoutput-clean
.PHONY: testoutput-clean
testoutput-clean:
-rm -rf testoutput8 testoutput8-jit testoutput8-dfa
-rm -rf testoutput16 testoutput16-jit testoutput16-dfa
-rm -rf testoutput32 testoutput32-jit testoutput32-dfa

CLEAN_LOCAL_TARGETS += testoutput-clean
PHONY_TARGETS += testoutput-clean

## ------------ End of testing -------------


Expand Down Expand Up @@ -964,24 +971,27 @@ coverage-clean: coverage-reset coverage-clean-report coverage-clean-data
coverage-distclean: coverage-clean

coverage: coverage-reset coverage-baseline coverage-check coverage-report
clean-local: coverage-clean
distclean-local: coverage-distclean

.PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean

# Without coverage support, still arrange for 'make distclean' to get rid of
# any coverage files that may have been left from a different configuration.
CLEAN_LOCAL_TARGETS += coverage-clean
DISTCLEAN_LOCAL_TARGETS += coverage-distclean
PHONY_TARGETS += coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean

else

coverage:
@echo "Configuring with --enable-coverage is required to generate code coverage report."

# Without coverage support, still arrange for 'make distclean' to get rid of
# any coverage files that may have been left from a different configuration.

DISTCLEANFILES += src/*.gcda src/*.gcno

distclean-local:
coverage-distclean:
rm -rf $(PACKAGE)-$(VERSION)-coverage*

DISTCLEAN_LOCAL_TARGETS += coverage-distclean
PHONY_TARGETS += coverage-distclean

endif # WITH_GCOV

## CMake support
Expand All @@ -995,4 +1005,14 @@ EXTRA_DIST += \
src/config-cmake.h.in \
CMakeLists.txt

## Set the special make and Automake targets. We could very easily simply
## redefine these targets to append prerequisites to them, rather than
## collecting the prerequisites in variables. However, there is an annoying
## Automake behaviour where it emits a warning if a target has prerequisites
## appended in a conditional block.

clean-local: $(CLEAN_LOCAL_TARGETS)
distclean-local: $(DISTCLEAN_LOCAL_TARGETS)
.PHONY: $(PHONY_TARGETS)

## end Makefile.am