netcdf-c/libdap2/Makefile.am
Dennis Heimbigner d85bb6fe20 The big change for this commit is complete the
disengagement of enable-netcdf4 from enable-hdf5.
That is, with the advent of nczarr, it is possible
to turn off hdf5 but still need netcdf-4 enabled
because nczarr uses libsrc4, but not libhdf5.
This change involves a bunch of things:
1. Modify configure.ac and CMakelist to make enable_hdf5
   control if hdf5 support is provided. For back compatibility,
   disable-netcdf4 is treated as disable-hdf5. But internally,
   netcdf4 support is controlled only by the enabling of formats
   that require it.
2. In support of #1, modify .travis.yml to use enable/disable-hdf5
   instead of enable/disable-netcdf4.
3. test_common.in is modified to track selected features,
   including enable-hdf5 and enable-s3-tests. This is used in
   selected tests that mix netcdf-3 and netcdf4 tests.
4. The conflation of USE_HDF5 and USE_NETCDF4 is common in
   code, tests, and build files, so all of those had to be weeded out.
5. It turns out that some of the NC4_dim functions really are HDF5 specific,
   but are not treated as such. So they are moved from nc4dim.c to
   hdf5dim.c or hdf5dispatch.c
6. Some generic functions in libhdf5 can be (and were) moved to libsrc4.
2020-08-12 15:42:50 -06:00

61 lines
1.7 KiB
Makefile

## This is a automake file, part of Unidata's netCDF package.
# Copyright 2018, see the COPYRIGHT file for more information.
# This automake file generates the Makefile to libdap2. Whatever that
# is!
# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/lib_flags.am
# We may have to add to these later.
DISTCLEANFILES =
MAINTAINERCLEANFILES =
CLEANFILES =
EXTRA_DIST = CMakeLists.txt
LDADD=
SRC= constraints.c dapcvt.c dapodom.c daputil.c \
ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c \
ncd2dispatch.c getvara.c dceconstraints.c dcetab.c \
dceparse.c dcelex.c
HDRS= nccommon.h constraints.h ncd2dispatch.h dapincludes.h \
dapodom.h getvara.h dapnc.h daputil.h dapdebug.h dapdump.h \
dceconstraints.h dcetab.h dceparselex.h
if ENABLE_DAP
if USE_NETCDF4
AM_CPPFLAGS += -I$(top_srcdir)/libsrc4
endif
# Build convenience library
noinst_LTLIBRARIES = libdap2.la
libdap2_la_SOURCES = $(SRC) $(HDRS)
libdap2_la_CPPFLAGS = $(AM_CPPFLAGS)
libdap2_la_LIBADD =
#if USE_NETCDF4
#LDADD += ${top_builddir}/libsrc4/libnetcdf4.la
#endif
#
#LDADD += ${top_builddir}/libsrc/libnetcdf3.la \
# ${top_builddir}/oc2/liboc.la \
# ${top_builddir}/libdispatch/libdispatch.la
#
endif # ENABLE_DAP
# These rule are used if someone wants to rebuild the grammar files.
# Otherwise never invoked, but records how to do it.
# BTW: note that renaming is essential because otherwise
# autoconf will forcibly delete files of the name *.tab.*
EXTRA_DIST += dce.y
makece::
bison -v -d -t -p dce dce.y
rm -f dcetab.c dcetab.h
sed -e 's/dce[.]tab[.]c/dcetab.c/g' -e 's/dce[.]tab[.]h/dcetab.h/g' <dce.tab.c >dcetab.c
sed -e 's/dce[.]tab[.]c/dcetab.c/g' -e 's/dce[.]tab[.]h/dcetab.h/g' <dce.tab.h >dcetab.h