-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile.am
119 lines (87 loc) · 4.28 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
include $(top_srcdir)/doxygen/aminclude.am
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4 -I m4/common
SUBDIRS = src test doxygen examples
EXTRA_DIST = README.md CHANGES LICENSE COPYING contrib
AM_DISTCHECK_CONFIGURE_FLAGS = --with-libmesh=$(LIBMESH_PREFIX) --with-boost=$(BOOST_ROOT) METHOD=$(LIBMESH_METHOD)
aclocaldir = $(prefix)/share/aclocal
aclocal_DATA = $(top_srcdir)/share/aclocal/*
EXTRA_DIST += $(aclocal_DATA)
# We have to put the testing .sh files here because
# of path issues during `make dist`. In particular,
# it always parks a './' at the beginning, so we can't
# use absolute paths.
EXTRA_DIST += $(GRINS_TEST_SH_FILES) $(GRINS_TEST_INPUT_FILES) $(GRINS_TEST_DATA_FILES)
#doxygendir = $(prefix)/doxygen
#doxygen_DATA = $(top_srcdir)/docs/doxygen/GRINS.tag
includedir = $(prefix)/include
BUILT_SOURCES = grins_config.h
include_HEADERS = $(top_builddir)/grins_config.h
# Tools in the auxiliary directory
AUX_DIST = build-aux/install-sh
AUX_DIST += build-aux/missing
AUX_DIST += build-aux/config.guess
AUX_DIST += build-aux/config.sub
AUX_DIST += build-aux/depcomp
AUX_DIST += build-aux/ltmain.sh
# Additional files to be deleted by 'make distclean'
DISTCLEANFILES = _configs.sed
DISTCLEANFILES += config.log
DISTCLEANFILES += grins_config.h
# Files to be deleted by 'make maintainer-clean'
MAINTAINERCLEANFILES = aclocal.m4 \
aminclude.am \
autom4te.cache/* \
$(AUX_DIST) \
config.status \
config.sub \
configure \
grins_config.h.tmp.in \
grins_config.h.tmp.in~ \
Makefile.in \
src/Makefile.in \
test/Makefile.in \
doxygen/Makefile.in
MOSTLYCLEANFILES = $(DX_CLEANFILES) \
docs/lcov
#---------------------------------
# Embedded license header support
#---------------------------------
# PB: I'm leaving this here commented out in case the AC_SUBST solution
# dies at some point. The below requires GNU make and causes a
# an Automake warning (that can be suppressed with -Wno-portability)
# so I went for the more general solution instead, but the below
# works.
#STAMPED_FILES = $(shell find $(top_srcdir)/src -name '*.h' -or -name '*.C')
# Since we don't distribute the lic_utils, check and make sure it's there.
# This way, we won't run this on distributed tarballs, only on the repos clones
if GRINS_LICENSESTAMPEXISTS
BUILT_SOURCES += .license.stamp
.license.stamp: $(top_srcdir)/LICENSE
@$(top_srcdir)/src/common/lic_utils/update_license.pl $(top_srcdir)/LICENSE $(GRINS_STAMPED_FILES)
echo 'updated source license headers' >$@
CLEANFILES = .license.stamp
endif
reindent:
@$(top_srcdir)/src/common/reindent.sh $(GRINS_STAMPED_FILES)
# -------------------------------------------
# Optional support for code coverage analysis
# -------------------------------------------
if CODE_COVERAGE_ENABLED
lcov_dir=$(top_builddir)/docs/lcov/html
# General philosophy is to maintain code coverage for the
# base library as generated by "make check" tests.
lcov-report:
@mkdir -p $(lcov_dir)
$(top_srcdir)/src/common/lcov/lcov --compat-libtool --directory . --capture --output-file $(lcov_dir)/lcov.info
$(top_srcdir)/src/common/lcov/lcov --list-full-path -l $(lcov_dir)/lcov.info | grep -v "`cd -P $(top_srcdir)/src && pwd`" | cut -d\| -f1 > $(lcov_dir)/remove
$(top_srcdir)/src/common/lcov/lcov -q -r $(lcov_dir)/lcov.info `cat $(lcov_dir)/remove` > $(lcov_dir)/lcov.cleaned.info
@rm $(lcov_dir)/remove
@mv $(lcov_dir)/lcov.cleaned.info $(lcov_dir)/lcov.info
$(top_srcdir)/src/common/lcov/genhtml -t "GRINS" -o $(lcov_dir) $(lcov_dir)/lcov.info
lcov-reset:
@rm -rf $(lcov_dir)
@find . -name "*.gcda" -exec rm {} \;
$(top_srcdir)/src/common/lcov/lcov --directory . --zerocounters
coverage: lcov-reset check lcov-report
endif