build system clean-up

This commit is contained in:
Ed Hartnett 2010-06-03 20:33:02 +00:00
parent 92ccf1c5fa
commit cdabf7bbf4
2 changed files with 14 additions and 67 deletions

View File

@ -7,12 +7,10 @@
# $Id: Makefile.am,v 2.98 2010/06/01 15:34:50 ed Exp $
# We may have to add to these later.
CLEANFILES =
LDADD=
noinst_LTLIBRARIES =
AM_CPPFLAGS = -I$(top_srcdir)/include -I${top_srcdir}/liblib \
-I${top_srcdir}/libsrc -I${top_srcdir}/libdispatch -I${top_srcdir}/oc
AM_LDFLAGS =
-I${top_srcdir}/libsrc -I${top_srcdir}/libdispatch -I${top_srcdir}/oc \
@EXTERN_CFLAGS@
AM_LDFLAGS = @EXTERN_LDFLAGS@
# The C API man page.
man_MANS = netcdf.3
@ -33,53 +31,27 @@ netcdf.3: $(top_srcdir)/man4/netcdf.m4
m4 $(M4FLAGS) $(ARGS_MANPAGE) $? >$@ || rm $@
# These files are part of the netCDF-3 library.
NC3_SOURCES = nc.h error3.c libvers.c string.c v1hpg.c fbits.h ncio.h \
libnetcdf3_la_SOURCES = nc.h error3.c libvers.c string.c v1hpg.c fbits.h ncio.h \
onstack.h rnd.h utf8proc.c utf8proc.h utf8proc_data.h nclistmgr.c \
putget.m4 attr.m4 nc3dispatch.c nc3dispatch.h nc.c var.c dim.c ncx.m4 \
ncx.h
# Does the user want to use ffio or posixio?
if USE_FFIO
NC3_SOURCES += ffio.c
libnetcdf3_la_SOURCES += ffio.c
else
NC3_SOURCES += posixio.c
libnetcdf3_la_SOURCES += posixio.c
endif
libnetcdf3_la_SOURCES = $(NC3_SOURCES)
noinst_LTLIBRARIES += libnetcdf3.la
noinst_LTLIBRARIES = libnetcdf3.la
# Define library for local test programs to use
LDADD += ${top_builddir}/libsrc/libnetcdf3.la stub3.lo \
${top_builddir}/libdispatch/libdispatch.la
LDADD = ${top_builddir}/libsrc/libnetcdf3.la stub3.lo \
${top_builddir}/libdispatch/libdispatch.la
if USE_DAP
LDADD += ${top_builddir}/oc/liboc.la
endif
if USE_NETCDF4
# If the user specified a root for HDF5, use it.
if USE_HDF5_DIR
AM_CPPFLAGS += -I@HDF5DIR@/include
AM_LDFLAGS += -L@HDF5DIR@/lib
endif
# If the user specified a root location for ZLIB, use it.
if USE_ZLIB_DIR
AM_CPPFLAGS += -I@ZLIBDIR@/include
AM_LDFLAGS += -L@ZLIBDIR@/lib
endif
# If the user specified a root location for SZLIB, use it.
if USE_SZLIB_DIR
AM_CPPFLAGS += -I@SZLIBDIR@/include
AM_LDFLAGS += -L@SZLIBDIR@/lib
endif
else # not USE_NETCDF4
endif # USE_NETCDF4
# Test the netCDF-3 library.
TESTPROGRAMS = t_nc
if !USE_NETCDF4
@ -88,7 +60,7 @@ endif
check_PROGRAMS = $(TESTPROGRAMS)
TESTS = $(TESTPROGRAMS)
CLEANFILES += t_nc
CLEANFILES = t_nc test.nc
# These files are cleaned on developer workstations (and then rebuilt
# with m4), but they are included in the distribution so that the user
@ -96,9 +68,6 @@ CLEANFILES += t_nc
MAINTAINERCLEANFILES = attr.c ncx.c putget.c $(man_MANS) attrx.c putgetx.c
EXTRA_DIST = attr.c ncx.c putget.c $(man_MANS) stub3.c
# This file is created by the test.
CLEANFILES += test.nc
# This tells make how to turn .m4 files into .c files.
.m4.c:
m4 $(AM_M4FLAGS) $(M4FLAGS) $< >$@

View File

@ -37,7 +37,7 @@ if USE_DAP
LDADD += ${top_builddir}/oc/liboc.la
endif
check_PROGRAMS = tst_h_files tst_h_files2 tst_h_atts tst_h_atts2 \
NC4_TESTS = tst_h_files tst_h_files2 tst_h_atts tst_h_atts2 \
tst_h_atts3 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps \
tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl \
tst_h_opaques tst_h_strings tst_h_strings1 tst_h_dimscales \
@ -50,6 +50,7 @@ tst_enums tst_vars2 tst_coords tst_coords2 tst_coords3 tst_vars3 \
tst_chunks tst_utf8 tst_fills tst_fillbug $(TST_V2) tst_xplatform \
tst_xplatform2 tst_endian_fill
check_PROGRAMS = $(NC4_TESTS)
if LARGE_FILE_TESTS
check_PROGRAMS += tst_large tst_large2
endif
@ -59,17 +60,7 @@ if TEST_PARALLEL
check_PROGRAMS += tst_h_par
endif
TESTS = tst_h_files tst_h_files2 tst_h_atts tst_h_atts3 tst_h_vars \
tst_h_vars2 tst_h_vars3 tst_h_grps tst_h_compounds tst_h_compounds2 \
tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl tst_h_opaques tst_h_strings \
tst_h_strings1 tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 \
tst_h_dimscales3 tst_h_enums tst_dims tst_dims2 tst_dims3 tst_files \
tst_files4 tst_vars tst_varms tst_unlim_vars tst_atts tst_atts2 \
tst_converts tst_converts2 tst_grps tst_compounds tst_compounds2 \
tst_compounds3 tst_vl tst_h_vl2 tst_opaques tst_strings tst_interops \
tst_interops4 tst_interops5 tst_enums tst_vars2 tst_vars3 tst_chunks \
tst_coords tst_coords2 tst_coords3 tst_utf8 tst_fills tst_fillbug \
$(TST_V2) tst_xplatform tst_xplatform2 tst_h_atts2 tst_endian_fill
TESTS = $(NC4_TESTS)
if USE_HDF4
check_PROGRAMS += tst_interops2
@ -81,20 +72,12 @@ endif # USE_HDF4_FILE_TESTS
tst_interops2_LDADD = ${lib_LTLIBRARIES} -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lz
endif # USE_HDF4
# Thee tst_lists programs needs to be fixed
# to match libsrc/nclistmgr.c
#check_PROGRAMS += tst_lists
#TESTS += tst_lists
EXTRA_DIST = ref_tst_compounds.nc ref_tst_h_compounds.h5 \
ref_tst_h_compounds2.h5 run_par_tests.sh run_valgrind_tests.sh \
run_hdf4_valgrind_tests.sh ref_tst_xplatform2_1.nc \
ref_tst_xplatform2_2.nc ref_tst_dims.nc run_get_hdf4_files.sh \
ref_tst_interops4.nc stub4.c
# (The above does not include tst_h_converts, which won't work until I
# sort out the MAX_INT problem. - Ed)
# These linker flags will be applied to all test program compiles.
LDADD += ${lib_LTLIBRARIES}
@ -108,9 +91,6 @@ if USE_PNETCDF
LDADD += -lpnetcdf
endif
# Always need to link to hdf5 and zlib.
#libnetcdf_la_LIBADD += -lhdf5_hl -lhdf5
# This script will run all the parallel test programs.
if TEST_PARALLEL
TESTS += run_par_tests.sh
@ -137,10 +117,8 @@ endif # USE_VALGRIND_TESTS
CLEANFILES = tst_nc_converts.nc tst_h_*.h5 tst_*.nc tst_interops*.h5 \
tst_interops2.h4 tst_interops4.nc AMSR_E_* MYD29.A2*
DISTCLEANFILES =
if USE_HDF4_FILE_TESTS
DISTCLEANFILES += AMSR_E_L2_Rain_V10_200905312326_A.hdf \
DISTCLEANFILES = AMSR_E_L2_Rain_V10_200905312326_A.hdf \
AMSR_E_L3_DailyLand_V06_20020619.hdf \
MYD29.A2009152.0000.005.2009153124331.hdf \
MYD29.A2002185.0000.005.2007160150627.hdf \