-
-
Notifications
You must be signed in to change notification settings - Fork 258
/
Makefile.am
192 lines (168 loc) · 6.5 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
#
# This makefile mostly just reinvokes make in the various subdirectories
# but does so in the correct order. You can alternatively invoke make from
# each subdirectory manually.
#
# Top-level HDF5 Makefile(.in)
# pmake has issues if variables are undefined. Solve this problem in
# top-level Makefile by defining .MAKEFLAGS target to -V before pmake can
# encounter any undefined variables.
# Automake resists putting anything but variable definitions first in
# a Makefile.in, so we'll put a placebo comment here and use sed in
# bin/reconfigure to turn it into the .MAKEFLAGS target. Sigh. -JL 2005
# Configure should set AM_MAKEFLAGS to -V to solve this problem in
# subdirectories.
# NOTE: This means that invoking pmake in a subdirectory will not work.
#xxx.MAKEFLAGS:@AM_MAKEFLAGS@
#xxx $(MAKE) all
#xxx
include $(top_srcdir)/config/commence.am
# include Doxygen rules (requires autoconf-archive >2016-03-20)
@DX_RULES@
# Define subdirectories to build.
## Automake understands that `make distclean' should recurse into
## conditional subdirectories even if `make all' does not.
# Since we're explicitly listing DIST_SUBDIRS, we also need to list
# directories that are only conditionally built (so that their Makefiles
# are cleaned as well).
# Note that `make clean' will not affect the examples or doc directories.
# Conditionals. These conditionals are defined during configure
# Define each variable to empty if it is not used to placate pmake
if BUILD_CXX_CONDITIONAL
CXX_DIR =c++
else
CXX_DIR=
endif
if BUILD_FORTRAN_CONDITIONAL
FORTRAN_DIR =fortran
else
FORTRAN_DIR=
endif
if BUILD_JAVA_CONDITIONAL
JAVA_DIR=java
else
JAVA_DIR=
endif
if BUILD_HDF5_HL_CONDITIONAL
HDF5_HL_DIR =hl
else
HDF5_HL_DIR=
endif
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
else
TESTSERIAL_DIR=
endif
if BUILD_TESTS_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR =testpar
else
TESTPARALLEL_DIR=
endif
if BUILD_TOOLS_CONDITIONAL
TOOLS_DIR =tools
else
TOOLS_DIR=
endif
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) utils . \
$(CXX_DIR) $(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar bin tools utils . c++ fortran hl java
# Some files generated during configure that should be cleaned
DISTCLEANFILES=config/stamp1 config/stamp2
# Some files/directories generated during check that should be cleaned
CHECK_CLEANFILES+=*-tmp
# Define rules for lib, progs, check, and tests.
# These simply involve recursing into subdirectories.
test _test: check
lib progs check-p check-s:
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Make all, tests, and (un)install
tests:
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Some C++ compilers/linkers will create a directory named ii_files in
# the root directory, which should be cleaned.
mostlyclean-local:
if test -d ii_files; then \
$(RM) -rf ii_files; \
fi
# 'make-install-all' will be redundant but will still work.
install: install-recursive
uninstall: uninstall-recursive
install-all:
@$(MAKE) $(AM_MAKEFLAGS) install
uninstall-all:
@$(MAKE) $(AM_MAKEFLAGS) uninstall
# check-install is just a synonym for installcheck
check-install: installcheck
# check-all-install tests all installation methods.
# Install via different mechanism and then compare against the default.
# Fine if only libXXX.a files are different since they may have been ranlib'ed.
check-all-install:
@echo Installing to default location
$(MAKE) install
@echo Installing to different prefix location
$(MAKE) prefix=${ROOT}/prefix-tmp install
@echo Compare against the default installation.
@echo Fine if only libXXX.a files are different.
-diff -r prefix-tmp ${prefix}
@echo Installing to different $$\DESTDIR location
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
@echo Compare against the default installation.
@echo Fine if only libXXX.a files are different.
-diff -r destdir-tmp${prefix} ${prefix}
# Only source files in the src directory include tracing information,
# so 'make trace' only needs to recurse into that directory.
trace:
@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
# doxygen support
if BUILD_DOXYGEN_CONDITIONAL
doxygen: doxygen-doc
endif
# Run tests with different Virtual File Drivers.
# Currently, only invoke check-vfd in the test directory.
check-vfd:
for d in src utils test; do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Run tests with different passthrough Virtual Object Layer Connectors.
# NOTE: Will only succeed with passthrough VOL connectors that use
# the native VOL connector as the terminal connector.
check-passthrough-vol:
for d in $(SUBDIRS); do \
if test $$d != .; then \
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
# Automake wants to make config.status depend on configure. This
# makes sense, but config.status can't always be regenerated
# properly, which can cause builds to fail.
# This is a problem for our Daily Tests, which need to be able to
# 'make distclean' reliably before running configure.
# The simple solution is to override the dependency Automake supplies
# for config.status so that it will never be regenerated.
$(top_builddir)/config.status:
# Don't include conclude.am in root Makefile; tests target needs to
# recurse into reguar subdirs.