From 139c899ba174fb8786cd4ad3723d9848f93f0c7b Mon Sep 17 00:00:00 2001 From: James Laird Date: Tue, 26 Apr 2005 13:10:31 -0500 Subject: [svn-r10667] Purpose: Bug fix Description: Made High-Level Fortran code use automatically generated headers rather than a separate hardcoded header. Solution: Set hdf5/hl/fortran/src to include hdf5/fortran/src, so that it will find the copy of H5f90i.h in that directory. Took #include "H5private.h" out of H5f90i.h (and moved it to files that included H5f90i.h. Platforms tested: mir, modi4, pommier --- fortran/src/H5f90.h | 1 + fortran/src/H5f90i.h | 6 ------ fortran/src/Makefile.am | 2 ++ fortran/src/Makefile.in | 2 ++ fortran/test/t.h | 3 ++- hl/fortran/src/Makefile.am | 3 ++- hl/fortran/src/Makefile.in | 4 +++- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h index a56cb0c..864da1c 100644 --- a/fortran/src/H5f90.h +++ b/fortran/src/H5f90.h @@ -17,6 +17,7 @@ #define _H5f90_H #include "hdf5.h" +#include "H5private.h" #include "H5f90i.h" #include "H5f90proto.h" diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h index 221e854..d3a30e9 100644 --- a/fortran/src/H5f90i.h +++ b/fortran/src/H5f90i.h @@ -16,12 +16,6 @@ #ifndef _H5f90i_H #define _H5f90i_H -/* - * Standard header files needed all the time - */ - -#include "H5private.h" - /* * Include generated header. This header defines integer types, * so this file only needs to define _fcd and real_f. diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index efc1aa2..da4549c 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -131,6 +131,8 @@ H5fort_type_defines.h: H5fortran_detect # Automake knows how to build fortran programs if we tell it the source # files. +# H5fortran_detect_gen.f90 is generated by running H5fortran_detect.f90. +# Only developers should need to do so. H5fortran_detect_SOURCES = H5fortran_detect.f90 # Mark this directory as part of the Fortran API diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 9c828f3..6cfae71 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -385,6 +385,8 @@ BUILT_SOURCES = H5f90i_gen.h # Automake knows how to build fortran programs if we tell it the source # files. +# H5fortran_detect_gen.f90 is generated by running H5fortran_detect.f90. +# Only developers should need to do so. H5fortran_detect_SOURCES = H5fortran_detect.f90 # Mark this directory as part of the Fortran API diff --git a/fortran/test/t.h b/fortran/test/t.h index 34cec34..d66f882 100644 --- a/fortran/test/t.h +++ b/fortran/test/t.h @@ -12,7 +12,8 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "../../src/hdf5.h" +#include "hdf5.h" +#include "H5private.h" #include "../src/H5f90i.h" #include "../src/H5f90proto.h" diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am index f8bac0c..7d06024 100644 --- a/hl/fortran/src/Makefile.am +++ b/hl/fortran/src/Makefile.am @@ -11,7 +11,8 @@ include $(top_srcdir)/config/commence.am -AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src +INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ + -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src AM_FCFLAGS=-I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src # Fortran libraries are linked statically to solve a build problem. diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index eab3355..e1ad254 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -297,7 +297,9 @@ H5CC = $(bindir)/h5cc H5CC_PP = $(bindir)/h5pcc H5FC = $(bindir)/h5fc H5FC_PP = $(bindir)/h5pfc -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src +INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ + -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src + AM_FCFLAGS = -I$(top_builddir)/fortran/src $(F9XMODFLAG)$(top_builddir)/fortran/src # Fortran libraries are linked statically to solve a build problem. -- cgit v0.12