2005-02-01 11:17:02 +08:00
|
|
|
#
|
2007-02-08 06:28:58 +08:00
|
|
|
# Copyright by The HDF Group.
|
2005-02-01 11:17:02 +08:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This file is part of HDF5. The full HDF5 copyright notice, including
|
|
|
|
# terms governing use, modification, and redistribution, is contained in
|
2017-04-18 03:32:16 +08:00
|
|
|
# the COPYING file, which can be found at the root of the source code
|
2021-02-17 22:52:36 +08:00
|
|
|
# distribution tree, or in https://www.hdfgroup.org/licenses.
|
2017-04-18 03:32:16 +08:00
|
|
|
# If you do not have access to either file, you may request a copy from
|
|
|
|
# help@hdfgroup.org.
|
2005-02-01 11:17:02 +08:00
|
|
|
##
|
|
|
|
## Makefile.am
|
|
|
|
## Run automake to generate a Makefile.in from this file.
|
|
|
|
##
|
2020-04-21 07:12:00 +08:00
|
|
|
#
|
2005-02-01 11:17:02 +08:00
|
|
|
# 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)
|
|
|
|
|
2005-02-12 01:40:52 +08:00
|
|
|
# pmake has issues if variables are undefined. Solve this problem in
|
[svn-r10158] Purpose:
Automake version upgrade
Description:
Upgraded automake version from 1.6.2 to 1.9.5.
Changed bin/reconfigure script to use automake 1.9.5.
Changed configure.in and Makefiles to use new FCFLAGS and FC variables
instead of FFLAGS and F9X.
Automake and configure should now do the lion's share of the work
supporting Fortran 9X; macros in acsite.m4 are now mostly unused (will
be cleaned later).
Altered how configure handles pmake; now root-level Makefile.in is
processed by bin/reconfigure to have a .MAKEFLAGS target, since
automake no longer allows us to define unused variables.
Configure now always checks for C++ compiler even if it is not
used, since automake thinks this is the Right Thing To Do and
will break otherwise.
Platforms tested:
Sol, copper, heping, mir, sleipnir, eirene, pommier, kelgia, modi4.
2005-03-08 01:57:27 +08:00
|
|
|
# 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
|
2005-02-12 01:40:52 +08:00
|
|
|
# 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.
|
[svn-r10158] Purpose:
Automake version upgrade
Description:
Upgraded automake version from 1.6.2 to 1.9.5.
Changed bin/reconfigure script to use automake 1.9.5.
Changed configure.in and Makefiles to use new FCFLAGS and FC variables
instead of FFLAGS and F9X.
Automake and configure should now do the lion's share of the work
supporting Fortran 9X; macros in acsite.m4 are now mostly unused (will
be cleaned later).
Altered how configure handles pmake; now root-level Makefile.in is
processed by bin/reconfigure to have a .MAKEFLAGS target, since
automake no longer allows us to define unused variables.
Configure now always checks for C++ compiler even if it is not
used, since automake thinks this is the Right Thing To Do and
will break otherwise.
Platforms tested:
Sol, copper, heping, mir, sleipnir, eirene, pommier, kelgia, modi4.
2005-03-08 01:57:27 +08:00
|
|
|
#xxx.MAKEFLAGS:@AM_MAKEFLAGS@
|
|
|
|
#xxx $(MAKE) all
|
|
|
|
#xxx
|
2005-02-12 01:40:52 +08:00
|
|
|
|
2005-02-01 11:17:02 +08:00
|
|
|
include $(top_srcdir)/config/commence.am
|
|
|
|
|
2021-05-05 06:43:19 +08:00
|
|
|
# include Doxygen rules (requires autoconf-archive >2016-03-20)
|
|
|
|
@DX_RULES@
|
|
|
|
|
2005-02-01 11:17:02 +08:00
|
|
|
# Define subdirectories to build.
|
|
|
|
## Automake understands that `make distclean' should recurse into
|
|
|
|
## conditional subdirectories even if `make all' does not.
|
2005-07-20 01:58:24 +08:00
|
|
|
## We need to list the examples directory in the DIST_SUBDIRS variable
|
|
|
|
## so that it will be visited by `make distclean'
|
2005-02-01 11:17:02 +08:00
|
|
|
# Add this directory to SUBDIRS so that examples get built after tools
|
|
|
|
# but before examples in extra interfaces (c++ and fortran).
|
|
|
|
# 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).
|
2020-04-21 07:12:00 +08:00
|
|
|
# Note that `make clean' will not affect the examples or doc directories.
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2005-02-12 01:40:52 +08:00
|
|
|
# Conditionals. These conditionals are defined during configure
|
|
|
|
# Define each variable to empty if it is not used to placate pmake
|
2005-02-01 11:17:02 +08:00
|
|
|
if BUILD_CXX_CONDITIONAL
|
|
|
|
CXX_DIR =c++
|
2005-02-12 01:40:52 +08:00
|
|
|
else
|
|
|
|
CXX_DIR=
|
2005-02-01 11:17:02 +08:00
|
|
|
endif
|
|
|
|
if BUILD_FORTRAN_CONDITIONAL
|
|
|
|
FORTRAN_DIR =fortran
|
2005-02-12 01:40:52 +08:00
|
|
|
else
|
|
|
|
FORTRAN_DIR=
|
2005-02-01 11:17:02 +08:00
|
|
|
endif
|
2016-02-29 10:43:00 +08:00
|
|
|
if BUILD_JAVA_CONDITIONAL
|
|
|
|
JAVA_DIR=java
|
|
|
|
else
|
|
|
|
JAVA_DIR=
|
|
|
|
endif
|
2005-02-01 11:17:02 +08:00
|
|
|
if BUILD_HDF5_HL_CONDITIONAL
|
|
|
|
HDF5_HL_DIR =hl
|
2005-02-12 01:40:52 +08:00
|
|
|
else
|
|
|
|
HDF5_HL_DIR=
|
2005-02-01 11:17:02 +08:00
|
|
|
endif
|
2019-06-06 12:20:01 +08:00
|
|
|
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
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2021-11-30 05:25:23 +08:00
|
|
|
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) bin $(TOOLS_DIR) utils . \
|
2019-06-14 23:47:09 +08:00
|
|
|
$(CXX_DIR) $(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
|
2021-11-30 05:25:23 +08:00
|
|
|
DIST_SUBDIRS = src test testpar tools utils . c++ fortran hl examples java
|
2005-02-01 11:17:02 +08:00
|
|
|
|
|
|
|
# Some files generated during configure that should be cleaned
|
2006-05-24 05:10:23 +08:00
|
|
|
DISTCLEANFILES=config/stamp1 config/stamp2
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2014-12-20 00:03:58 +08:00
|
|
|
# Some files/directories generated during check that should be cleaned
|
2009-04-15 06:07:24 +08:00
|
|
|
CHECK_CLEANFILES+=*-tmp
|
|
|
|
|
2005-02-01 11:17:02 +08:00
|
|
|
# Define rules for lib, progs, check, and tests.
|
|
|
|
# These simply involve recursing into subdirectories.
|
|
|
|
test _test: check
|
|
|
|
|
2005-08-03 01:59:03 +08:00
|
|
|
lib progs check-p check-s:
|
2015-03-24 00:05:44 +08:00
|
|
|
for d in $(SUBDIRS); do \
|
2006-03-23 22:22:34 +08:00
|
|
|
if test $$d != .; then \
|
2005-02-12 01:40:52 +08:00
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
2006-03-23 22:22:34 +08:00
|
|
|
fi; \
|
2005-02-01 11:17:02 +08:00
|
|
|
done
|
|
|
|
|
2014-12-20 00:03:58 +08:00
|
|
|
# Make all, tests, and (un)install
|
2006-03-23 22:22:34 +08:00
|
|
|
tests:
|
2015-03-24 00:05:44 +08:00
|
|
|
for d in $(SUBDIRS); do \
|
2006-03-23 22:22:34 +08:00
|
|
|
if test $$d != .; then \
|
2005-02-12 01:40:52 +08:00
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
2006-03-23 22:22:34 +08:00
|
|
|
fi; \
|
2014-12-18 07:07:24 +08:00
|
|
|
done
|
2005-04-07 02:25:22 +08:00
|
|
|
|
2006-03-23 22:22:34 +08:00
|
|
|
# Check-clean also recurses into examples directory
|
|
|
|
check-clean:
|
2015-03-24 00:05:44 +08:00
|
|
|
for d in $(SUBDIRS) examples; do \
|
2006-03-23 22:22:34 +08:00
|
|
|
if test $$d != .; then \
|
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
|
|
|
fi; \
|
|
|
|
done
|
2009-04-15 06:07:24 +08:00
|
|
|
$(RM) -rf prefix-tmp destdir-tmp
|
2006-03-23 22:22:34 +08:00
|
|
|
|
2005-07-22 03:28:11 +08:00
|
|
|
# Some C++ compilers/linkers will create a directory named ii_files in
|
|
|
|
# the root directory, which should be cleaned.
|
2005-02-01 11:17:02 +08:00
|
|
|
mostlyclean-local:
|
2005-08-03 01:33:49 +08:00
|
|
|
if test -d ii_files; then \
|
2006-03-23 22:22:34 +08:00
|
|
|
$(RM) -rf ii_files; \
|
|
|
|
fi
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2010-07-09 10:52:14 +08:00
|
|
|
# 'make install' will now install examples, the same as 'make install-all'.
|
|
|
|
# 'make-install-all' will be redundant but will still work.
|
|
|
|
install: install-recursive install-examples
|
2020-04-21 07:12:00 +08:00
|
|
|
uninstall: uninstall-recursive uninstall-examples
|
2010-07-09 10:52:14 +08:00
|
|
|
|
2005-07-20 01:58:24 +08:00
|
|
|
# 'make install-all' also installs examples
|
2005-02-01 11:17:02 +08:00
|
|
|
install-all:
|
2005-08-02 06:22:55 +08:00
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) install
|
2005-02-01 11:17:02 +08:00
|
|
|
uninstall-all:
|
2005-08-02 06:22:55 +08:00
|
|
|
@$(MAKE) $(AM_MAKEFLAGS) uninstall
|
2005-02-01 11:17:02 +08:00
|
|
|
|
|
|
|
# Install examples in this directory and recursively
|
|
|
|
install-examples uninstall-examples:
|
2015-03-24 00:05:44 +08:00
|
|
|
for d in examples $(HDF5_INTERFACES) $(HL); do \
|
2005-02-12 01:40:52 +08:00
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
2005-02-01 11:17:02 +08:00
|
|
|
done
|
|
|
|
|
2005-07-20 01:58:24 +08:00
|
|
|
# Placeholder to remind users that docs are now in a separate repository.
|
2005-02-01 11:17:02 +08:00
|
|
|
install-doc:
|
2005-08-02 06:22:55 +08:00
|
|
|
@echo "docs no longer live in this tree. Use install-examples to install examples."
|
2005-02-01 11:17:02 +08:00
|
|
|
|
|
|
|
uninstall-doc:
|
2005-08-02 06:22:55 +08:00
|
|
|
@echo "docs no longer live in this tree. Use install-examples to install examples."
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2020-04-21 07:12:00 +08:00
|
|
|
# `make check-install' or `make installcheck' checks that examples can
|
2005-02-01 11:17:02 +08:00
|
|
|
# be successfully built
|
|
|
|
installcheck-local:
|
2010-07-09 10:52:14 +08:00
|
|
|
if test -n "${DESTDIR}"; then \
|
2010-10-05 01:15:30 +08:00
|
|
|
(cd ${DESTDIR}$(bindir) && pwd && ./h5redeploy -force); \
|
2010-07-09 10:52:14 +08:00
|
|
|
fi
|
2005-08-02 06:22:55 +08:00
|
|
|
@(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1;
|
2005-02-01 11:17:02 +08:00
|
|
|
|
2006-03-24 05:26:17 +08:00
|
|
|
# check-install is just a synonym for installcheck
|
|
|
|
check-install: installcheck
|
|
|
|
|
2009-04-15 22:17:18 +08:00
|
|
|
# check-all-install tests all installation methods.
|
2009-04-15 06:07:24 +08:00
|
|
|
# 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}
|
2009-04-16 06:12:50 +08:00
|
|
|
@echo Installing to different $$\DESTDIR location
|
2009-04-15 22:17:18 +08:00
|
|
|
env DESTDIR=${ROOT}/destdir-tmp $(MAKE) install
|
2009-04-15 06:07:24 +08:00
|
|
|
@echo Compare against the default installation.
|
|
|
|
@echo Fine if only libXXX.a files are different.
|
|
|
|
-diff -r destdir-tmp${prefix} ${prefix}
|
|
|
|
|
2005-11-18 23:55:22 +08:00
|
|
|
# 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;
|
|
|
|
|
2021-05-05 06:43:19 +08:00
|
|
|
# doxygen support
|
|
|
|
if BUILD_DOXYGEN_CONDITIONAL
|
|
|
|
doxygen: doxygen-doc
|
|
|
|
endif
|
2020-11-04 00:42:09 +08:00
|
|
|
|
2006-08-01 03:46:16 +08:00
|
|
|
# Run tests with different Virtual File Drivers.
|
|
|
|
# Currently, only invoke check-vfd in the test directory.
|
|
|
|
check-vfd:
|
2020-08-15 22:32:50 +08:00
|
|
|
for d in src utils test; do \
|
|
|
|
if test $$d != .; then \
|
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
|
|
|
fi; \
|
2006-08-01 03:46:16 +08:00
|
|
|
done
|
|
|
|
|
2019-04-12 01:46:22 +08:00
|
|
|
# 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:
|
2019-03-10 11:41:38 +08:00
|
|
|
for d in $(SUBDIRS); do \
|
2018-11-29 09:07:30 +08:00
|
|
|
if test $$d != .; then \
|
|
|
|
(cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
2005-05-21 02:03:35 +08:00
|
|
|
# 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:
|
|
|
|
|
2005-02-01 11:17:02 +08:00
|
|
|
# Don't include conclude.am in root Makefile; tests target needs to
|
2014-12-18 07:07:24 +08:00
|
|
|
# recurse into reguar subdirs.
|