-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile.am
105 lines (84 loc) · 3.39 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
# Doxygen support
include $(top_srcdir)/doxygen/aminclude.am
# AUTOMAKE_OPTIONS = foreign # Conflicts with libMesh options
AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4 -I m4/common -I m4/autoconf-submodule
SUBDIRS = src test doxygen
EXTRA_DIST = CHANGES LICENSE COPYING share docs
aclocaldir = $(prefix)/share/aclocal
aclocal_DATA = $(top_srcdir)/share/aclocal/*
# Eliminate .svn directories in dist tarball
# Also hacking around EXTRA_DIST not dealing with
# the antioch.m4 symlink correctly. So we manually
# deal with it. Also, by default, it seems permissions
# don't let us remove stuff, we chmod it before
# trying to remove stuff.
dist-hook:
chmod -R u+w $(distdir)
rm -rf `find $(distdir)/ -name .svn`
rm -rf $(distdir)/share/aclocal/metaphysicl.m4
cp -L $(top_srcdir)/share/aclocal/metaphysicl.m4 $(distdir)/share/aclocal
#if SVN_CHECKOUT
# EXTRA_DIST += dist_version
#
#TODO: check if dist_version is needed in BUILT_SOURCES (in addition to EXTRA_DIST)
# BUILT_SOURCES = dist_version
#
#dist_version: FORCE
# @SVN_REVISION@ > $(top_srcdir)/dist_version
#
#FORCE:
#endif
# 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
# Support for pkgconfig
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = metaphysicl.pc
# Support 'make install prefix=/other/path' with pkgconfig
install-data-hook:
@if (test "x$(prefix)" != "x@prefix@"); then \
oldprefix="@prefix@" ; \
newprefix="$(prefix)" ; \
cd $(DESTDIR)$(libdir)/pkgconfig ; \
for genfile in $(pkgconfig_DATA); do \
echo " " ; \
echo " *** replacing $$oldprefix" ; \
echo " *** with $$newprefix" ; \
echo " *** in generated file $$genfile" ; \
echo " " ; \
cd $(DESTDIR)$(prefix) && cat $$genfile | $(SED) "s,$$oldprefix,$$newprefix,g" > $$genfile.replaced ; \
cd $(DESTDIR)$(prefix) && mv -f $$genfile.replaced $$genfile ; \
done ; \
fi
# Additional files to be deleted by 'make distclean'
DISTCLEANFILES = _configs.sed
DISTCLEANFILES += src/utilities/include/metaphysicl/metaphysicl_config.h
MOSTLYCLEANFILES =
MOSTLYCLEANFILES += $(DX_CLEANFILES)
MOSTLYCLEANFILES += docs/lcov
# -------------------------------------------
# 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 -f $(lcov_dir)/lcov.cleaned.info $(lcov_dir)/lcov.info
$(top_srcdir)/src/common/lcov/genhtml -t "MetaPhysicL" -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