[svn-r10587] Purpose:

Minor feature

Description:
If a user configures without C++ or Fortran, 'make' will not recurse into
c++ or fortran directories.  However, if the user cd's into these
directories and 'makes,' the Makefiles will attempt to build interfaces
that have not been configured, usually failing.
In an unrelated but minor change, src/H5detect should be compiled with
the -g flag to disable compiler optimizations since it is only
executed once.

Solution:
Make it harder for users to try to compile interfaces that have not been
configured by making c++, fortran, and hl directories not recurse into
their subdirectories unless they have been configured.
Thus, 'make' in /fortran/src will break if Fortran has not been configured,
but 'make' in /fortran will not break.

Platforms tested:
mir, modi4, copper

Misc. update:
This commit is contained in:
James Laird 2005-04-11 16:47:05 -05:00
parent 408471420f
commit afef3c0358
8 changed files with 36 additions and 8 deletions

View File

@ -19,7 +19,10 @@
include $(top_srcdir)/config/commence.am
SUBDIRS=src test
## Only recurse into subdirectories if C++ interface is enabled.
if BUILD_CXX_CONDITIONAL
SUBDIRS=src test
endif
DIST_SUBDIRS = $(SUBDIRS) examples
# Clean and mostlyclean need to recurse into examples directory

View File

@ -279,7 +279,7 @@ H5CC = $(bindir)/h5cc
H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
SUBDIRS = src test
@BUILD_CXX_CONDITIONAL_TRUE@SUBDIRS = src test
DIST_SUBDIRS = $(SUBDIRS) examples
# Automake needs to be taught how to build lib, progs, and tests targets.

View File

@ -28,7 +28,11 @@ if BUILD_PARALLEL_CONDITIONAL
endif
# Subdirectories in build order, not including examples directory
SUBDIRS=src test $(TESTPARALLEL_DIR)
## Only recurse into subdirectories if HDF5 is configured to use Fortran.
if BUILD_FORTRAN_CONDITIONAL
SUBDIRS=src test $(TESTPARALLEL_DIR)
endif
# All directories that have Makefiles
DIST_SUBDIRS=src test testpar examples

View File

@ -286,7 +286,8 @@ H5FC_PP = $(bindir)/h5pfc
@BUILD_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar
# Subdirectories in build order, not including examples directory
SUBDIRS = src test $(TESTPARALLEL_DIR)
@BUILD_FORTRAN_CONDITIONAL_TRUE@SUBDIRS = src test $(TESTPARALLEL_DIR)
# All directories that have Makefiles
DIST_SUBDIRS = src test testpar examples

View File

@ -24,6 +24,10 @@ if BUILD_CXX_CONDITIONAL
CXX_DIR = c++
endif
SUBDIRS=src test $(CXX_DIR) $(FORTRAN_DIR)
## Don't recurse into any subdirectories if HDF5 is not configured to
## use the HL library
if BUILD_HDF5_HL_CONDITIONAL
SUBDIRS=src test $(CXX_DIR) $(FORTRAN_DIR)
endif
include $(top_srcdir)/config/conclude.am

View File

@ -277,7 +277,7 @@ H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
@BUILD_FORTRAN_CONDITIONAL_TRUE@FORTRAN_DIR = fortran
@BUILD_CXX_CONDITIONAL_TRUE@CXX_DIR = c++
SUBDIRS = src test $(CXX_DIR) $(FORTRAN_DIR)
@BUILD_HDF5_HL_CONDITIONAL_TRUE@SUBDIRS = src test $(CXX_DIR) $(FORTRAN_DIR)
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,

View File

@ -24,6 +24,7 @@ include $(top_srcdir)/config/commence.am
# a long time to compile it with any optimization on. H5detect is used
# to generate H5Tinit.c once. So, optimization is not critical.
noinst_PROGRAMS = H5detect
H5detect_CFLAGS = -g
# Our main target, the HDF5 library
lib_LTLIBRARIES=libhdf5.la

View File

@ -108,7 +108,7 @@ am_libhdf5_la_OBJECTS = H5.lo H5A.lo H5AC.lo H5B.lo H5B2.lo \
libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
H5detect_SOURCES = H5detect.c
H5detect_OBJECTS = H5detect.$(OBJEXT)
H5detect_OBJECTS = H5detect-H5detect.$(OBJEXT)
H5detect_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
@ -336,6 +336,7 @@ H5CC = $(bindir)/h5cc
H5CC_PP = $(bindir)/h5pcc
H5FC = $(bindir)/h5fc
H5FC_PP = $(bindir)/h5pfc
H5detect_CFLAGS = -g
# Our main target, the HDF5 library
lib_LTLIBRARIES = libhdf5.la
@ -636,7 +637,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zshuffle.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zszip.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ztrans.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5detect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5detect-H5detect.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@ -659,6 +660,20 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
H5detect-H5detect.o: H5detect.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(H5detect_CFLAGS) $(CFLAGS) -MT H5detect-H5detect.o -MD -MP -MF "$(DEPDIR)/H5detect-H5detect.Tpo" -c -o H5detect-H5detect.o `test -f 'H5detect.c' || echo '$(srcdir)/'`H5detect.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/H5detect-H5detect.Tpo" "$(DEPDIR)/H5detect-H5detect.Po"; else rm -f "$(DEPDIR)/H5detect-H5detect.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='H5detect.c' object='H5detect-H5detect.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(H5detect_CFLAGS) $(CFLAGS) -c -o H5detect-H5detect.o `test -f 'H5detect.c' || echo '$(srcdir)/'`H5detect.c
H5detect-H5detect.obj: H5detect.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(H5detect_CFLAGS) $(CFLAGS) -MT H5detect-H5detect.obj -MD -MP -MF "$(DEPDIR)/H5detect-H5detect.Tpo" -c -o H5detect-H5detect.obj `if test -f 'H5detect.c'; then $(CYGPATH_W) 'H5detect.c'; else $(CYGPATH_W) '$(srcdir)/H5detect.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/H5detect-H5detect.Tpo" "$(DEPDIR)/H5detect-H5detect.Po"; else rm -f "$(DEPDIR)/H5detect-H5detect.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='H5detect.c' object='H5detect-H5detect.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(H5detect_CFLAGS) $(CFLAGS) -c -o H5detect-H5detect.obj `if test -f 'H5detect.c'; then $(CYGPATH_W) 'H5detect.c'; else $(CYGPATH_W) '$(srcdir)/H5detect.c'; fi`
mostlyclean-libtool:
-rm -f *.lo