mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
2ea1cf5f1b
stored in the _NCProperties attribute to allow two things: 1. capture of additional library dependencies (over and above hdf5) 2. Recognition of non-netcdf libraries that create netcdf-4 format files. To this end, the _NCProperties format has been extended to be and arbitrary set of key=value pairs separated by commas. This new format has version = 2, and uses commas as the pair separator. Thus the general form is: _NCProperties = "version=2,key1=value,key2=value2..." ; This new version is accompanied by a new ./configure option of the form --with-ncproperties="key1=value1,key2=value2..." that specifies pairs to add to the _NCProperties attribute for all files created with that netcdf library. At this point, what is missing is some programmatic way to specify either all the pairs or additional pairs to the _NCProperties attribute. Not sure of the best way to do this. Builders using non-netcdf libraries can specify whatever they want in the key value pairs (as long as the version=2 is specified first). By convention, the primary library is expected to be the the first pair after the leading version=2 pair, but this is convention only and is neither required nor enforced. Related changes: 1. Fixed the tests that check _NCProperties to properly operate with version=2. 2. When reading a version 1 _NCProperties attribute, convert it to look like a version 2 attribute. 2. Added some version 2 tests to ncdump/tst_fileinfo.c and ncdump/tst_fileinfo.sh Misc Changes: 1. Fix minor problem in ncdap_test/testurl.sh where a parameter to buildurl needed to be quoted. 2. Minor fix to ncgen to swap switches -H and -h to be consistent with other utilities. 3. Document the -M flag in nccopy usage() and the nccopy man page. 4. Modify a test case to use the nccopy -M flag.
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
# Test c output
|
|
T=tst_fileinfo
|
|
|
|
#ARGS=./x.nc
|
|
|
|
#TF=test_atomic_array.cdl
|
|
|
|
#CMD=valgrind --leak-check=full
|
|
CMD=gdb --args
|
|
|
|
#HDF4=1
|
|
#PAR=1
|
|
|
|
TD=/cygdrive/d/git/thredds/dap4/d4tests/src/test/data/resources/testfiles
|
|
|
|
CFLAGS=-Wall -g -O0 -I.. -I../include
|
|
|
|
ifdef PAR
|
|
CC=mpicc
|
|
#CC=/usr/local/bin/mpicc
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lcurl -lpnetcdf -lmpich -lm
|
|
else
|
|
ifdef HDF4
|
|
CC=gcc
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lm -lcurl
|
|
else
|
|
CC=gcc
|
|
#LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lm -lcurl
|
|
endif
|
|
endif
|
|
|
|
# cd .. ; ${MAKE} all
|
|
|
|
LLP=/usr/local/lib:${LD_LIBRARY_PATH}
|
|
|
|
all:: comp
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
${CMD} ./$T ${ARGS}
|
|
|
|
comp::
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
${CC} -o $T ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}; \
|
|
|
|
x.nc: x.cdl
|
|
ncgen -4 x.cdl
|
|
|
|
x.cdl: ${TD}/${TF}
|
|
rm -f ./x.cdl
|
|
cat ${TD}/${TF} > ./x.cdl
|
|
|
|
|
|
cpp::
|
|
${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
|