diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-06-08 21:05:07 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-06-08 21:05:07 (GMT) |
commit | 602a9ce693270280f917bd7d90710df153dcbbd1 (patch) | |
tree | 5747a4852e17941e611aeac7c9a0ee8c1219778d /fortran/src/Makefile.am | |
parent | 24ccb5da13fd45c346aee164314c27b865425f92 (diff) | |
download | hdf5-602a9ce693270280f917bd7d90710df153dcbbd1.zip hdf5-602a9ce693270280f917bd7d90710df153dcbbd1.tar.gz hdf5-602a9ce693270280f917bd7d90710df153dcbbd1.tar.bz2 |
[svn-r10882] Purpose:
Bug fix/improvement
Description:
Added another step to fortran type detection. This should help on some
bizarre platforms.
Solution:
Formerly, H5fortran_detect.f90 was included in the distribution. Now
it is generated by H5test_kind.f90 (written by Elena).
Platforms tested:
verbena, modi4, copper
Diffstat (limited to 'fortran/src/Makefile.am')
-rw-r--r-- | fortran/src/Makefile.am | 85 |
1 files changed, 49 insertions, 36 deletions
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 14a1c11..52dee19 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -55,7 +55,8 @@ DISTCLEANFILES=h5fc libhdf5_fortran.settings # H5fortran_types.f90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h +MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.f90 # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -101,29 +102,33 @@ endif # and matching them to C types. This is accomplished using helper # programs. # It's a bit tricky to make sure that Automake builds things in the right -# order (especially when using 'gmake -j ...' -# H5fortran_detect.f90 needs to be compiled into H5fortran_detect. -# This program is run, and its output is saved in H5fort_type_defines.h +# order (especially when using 'gmake -j ...') +# H5test_kind is compiled and run to produce H5fortran_detect.f90. +# H5fortran_detect is compiled and run to produce H5fort_type_defines.h. # H5match_types.c then includes this file and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.f90, which are needed by the Fortran library. +# and H5fortran_types.f90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5fortran_detect +noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind -# Tell Automake to create H5f90i_gen.h before it does anything else. -# When it creates H5f90i_gen.h, it will create H5fortran_types.f90 as -# a side effect. +# Tell Automake to create H5f90i_gen.h before it builds the library +# sources. When it creates H5f90i_gen.h, it will create +# H5fortran_types.f90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# Specify what Automake needs to create: first the H5fort_type_defines.h +#Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types.c - $(MAKE) $(AM_MAKEFLAGS) H5fort_type_defines.h +H5fortran_types.f90 H5f90i_gen.h: H5match_types.c H5fort_type_defines.h $(MAKE) $(AM_MAKEFLAGS) H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) + +# JAMES: does it need to work like this? $(MAKE) $(AM_MAKEFLAGS) H5fort_type_defines.h +# JAMES $(MAKE) $(AM_MAKEFLAGS) H5match_types$(EXEEXT) +# JAMES $(RUNSERIAL) ./H5match_types$(EXEEXT) + # H5fort_type_defines.h is created by running H5fortran_detect. # Obviously, H5fortran_detect needs to be built first. H5fort_type_defines.h: H5fortran_detect$(EXEEXT) @@ -131,10 +136,16 @@ H5fort_type_defines.h: H5fortran_detect$(EXEEXT) # 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 +# H5test_kind.f90 generates H5fortran_detect.f90. +H5fortran_detect.f90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > 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 + # Mark this directory as part of the Fortran API HDF_FORTRAN=yes @@ -142,27 +153,29 @@ HDF_FORTRAN=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5fortran_flags.lo: $(srcdir)/H5fortran_flags.f90 -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_flags.lo H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo -H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo -H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo -H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo -HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5Aff.lo \ - H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ - H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5Aff.lo \ - H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ - H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo H5FDmpioff.lo +H5fortran_flags.lo: $(srcdir)/H5fortran_flags.f90 +H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_flags.lo H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.f90 +H5fortran_detect.lo: H5fortran_detect.f90 +H5test_kind.lo: $(srcdir)/H5test_kind.f90 +H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo +H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo +H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo +H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo +H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo +HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5Aff.lo \ + H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ + H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo +H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5Aff.lo \ + H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ + H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo H5FDmpioff.lo include $(top_srcdir)/config/conclude.am |