summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-11-18 20:31:53 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-11-18 20:31:53 (GMT)
commit0f870b0f479c8f561def96e689fc8835b70de156 (patch)
tree2d15f750a4b6d5f9e2ad7c7be76c94c387ddab23 /fortran
parent0426d8d7e17a69ce3e6d870ad981d366c466c42d (diff)
downloadhdf5-0f870b0f479c8f561def96e689fc8835b70de156.zip
hdf5-0f870b0f479c8f561def96e689fc8835b70de156.tar.gz
hdf5-0f870b0f479c8f561def96e689fc8835b70de156.tar.bz2
[svn-r11741] Purpose:
Bug fix Description: Fortran type generation was broken in two ways. Fixed both. Solution: Firstly, there were a couple of path problems. Fixed a typo and specified the full path of a file. Secondly, the dependencies weren't right when building with HDF5-specific commands (make lib, make check-s, etc.). Tweaked dependencies to fix the problem. Platforms tested: mir, modi4, sleipnir
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in22
-rw-r--r--fortran/examples/Makefile.in22
-rw-r--r--fortran/src/Makefile.am4
-rw-r--r--fortran/src/Makefile.in32
-rw-r--r--fortran/test/Makefile.in22
-rw-r--r--fortran/testpar/Makefile.in22
6 files changed, 90 insertions, 34 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 2016943..3a9c4fc 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -678,13 +678,14 @@ installcheck-local:
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-# BUILT_SOURCES contain targets that need to be built before anything else
-# in the directory (e.g., Fortran type detection)
-build-lib: $(BUILT_SOURCES) $(LIB)
-build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
-build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests check-s check-p check-clean ::
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
@@ -692,6 +693,15 @@ lib progs tests check-s check-p check-clean ::
fi; \
done
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index e774fcb..cb78035 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -600,13 +600,14 @@ ph5example: ph5example.f90
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-# BUILT_SOURCES contain targets that need to be built before anything else
-# in the directory (e.g., Fortran type detection)
-build-lib: $(BUILT_SOURCES) $(LIB)
-build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
-build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests check-s check-p check-clean ::
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
@@ -614,6 +615,15 @@ lib progs tests check-s check-p check-clean ::
fi; \
done
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 266186f..52854a3 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -22,7 +22,7 @@ include $(top_srcdir)/config/commence.am
# Include src directory in both Fortran and C flags (C compiler is used
# for linking).
INCLUDES = -I$(top_srcdir)/src
-AM_FCFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/src/fortran
+AM_FCFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/fortran/src
AM_FCLIBS=$(LIBHDF5)
@@ -144,7 +144,7 @@ H5fortran_detect.f90: H5test_kind$(EXEEXT)
# H5test_kind.f90 is included in the distribution, and Automake knows
# how to compile a fortran program given its sources.
-H5test_kind_SOURCES = H5test_kind.f90
+H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90
# Mark this directory as part of the Fortran API
HDF_FORTRAN=yes
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 5a34175..0578ca1 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -373,7 +373,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Include src directory in both Fortran and C flags (C compiler is used
# for linking).
INCLUDES = -I$(top_srcdir)/src
-AM_FCFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/fortran
+AM_FCFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/fortran/src
AM_FCLIBS = $(LIBHDF5)
# This is our main target, the fortran library
@@ -429,7 +429,7 @@ H5fortran_detect_SOURCES = H5fortran_detect.f90
# H5test_kind.f90 is included in the distribution, and Automake knows
# how to compile a fortran program given its sources.
-H5test_kind_SOURCES = H5test_kind.f90
+H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90
# Mark this directory as part of the Fortran API
HDF_FORTRAN = yes
@@ -586,6 +586,12 @@ distclean-compile:
.f90.lo:
$(LTFCCOMPILE) -c -o $@ $<
+H5test_kind.o: $(srcdir)/H5test_kind.f90
+ $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind.o `test -f '$(srcdir)/H5test_kind.f90' || echo '$(srcdir)/'`$(srcdir)/H5test_kind.f90
+
+H5test_kind.obj: $(srcdir)/H5test_kind.f90
+ $(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind.obj `if test -f '$(srcdir)/H5test_kind.f90'; then $(CYGPATH_W) '$(srcdir)/H5test_kind.f90'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/H5test_kind.f90'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -886,13 +892,14 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5Aff.lo \
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-# BUILT_SOURCES contain targets that need to be built before anything else
-# in the directory (e.g., Fortran type detection)
-build-lib: $(BUILT_SOURCES) $(LIB)
-build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
-build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests check-s check-p check-clean ::
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
@@ -900,6 +907,15 @@ lib progs tests check-s check-p check-clean ::
fi; \
done
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7b3ade1..e8b8093 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -825,13 +825,14 @@ fflush2.chkexe_: fflush1.chkexe_
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-# BUILT_SOURCES contain targets that need to be built before anything else
-# in the directory (e.g., Fortran type detection)
-build-lib: $(BUILT_SOURCES) $(LIB)
-build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
-build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests check-s check-p check-clean ::
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
@@ -839,6 +840,15 @@ lib progs tests check-s check-p check-clean ::
fi; \
done
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index e9df849..3301d1f 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -620,13 +620,14 @@ check-install: installcheck
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
-# BUILT_SOURCES contain targets that need to be built before anything else
-# in the directory (e.g., Fortran type detection)
-build-lib: $(BUILT_SOURCES) $(LIB)
-build-progs: $(BUILT_SOURCES) $(LIB) $(PROGS)
-build-tests: $(BUILT_SOURCES) $(LIB) $(PROGS) $(TESTS)
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(TESTS)
-lib progs tests check-s check-p check-clean ::
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
@$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
@for d in X $(SUBDIRS); do \
if test $$d != X && test $$d != .; then \
@@ -634,6 +635,15 @@ lib progs tests check-s check-p check-clean ::
fi; \
done
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
# Tell Automake to build tests when the user types `make all' (this is
# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
# Automake won't build them automatically, either.