diff options
author | Steve Price <steve@FreeBSD.org> | 1999-11-14 02:32:21 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 1999-11-14 02:32:21 +0000 |
commit | b0628da359513a9ece6addf3853a3d89aa255cda (patch) | |
tree | e560756285d43fdb29ffef8e65e31497d442fea8 /graphics/hdf/files/mfhdf/ncgen | |
parent | Remove the ^M's in all the files, install a startup script, (diff) |
Update to version 4.1r3.
PR: 14717
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=23083
Diffstat (limited to 'graphics/hdf/files/mfhdf/ncgen')
-rw-r--r-- | graphics/hdf/files/mfhdf/ncgen/Makefile | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/graphics/hdf/files/mfhdf/ncgen/Makefile b/graphics/hdf/files/mfhdf/ncgen/Makefile new file mode 100644 index 000000000000..d954137cffa8 --- /dev/null +++ b/graphics/hdf/files/mfhdf/ncgen/Makefile @@ -0,0 +1,72 @@ +# $FreeBSD$ + +PROG = ncgen +MANDIR = ${PREFIX}/man/man +LDFLAGS += -L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf +CFLAGS += -I${.CURDIR}/../libsrc -I${.CURDIR}/../../hdf/src -DNDEBUG +SRCS = main.c generate.c load.c ncgentab.c escapes.c \ + getfill.c init.c close.c genlib.c + +ENVIR = env LD_LIBRARY_PATH=${.CURDIR}/../libsrc:${.CURDIR}/../../hdf/src +NCDUMP = ${.CURDIR}/../ncdump/ncdump + +test: $(PROG) test0.cdl btest ctest ftest + +ncgenyy.c: ncgen.l + ${LEX} ${LFLAGS} ncgen.l + mv lex.yy.c ncgenyy.c + +ncgentab.c: ncgenyy.c ncgen.y + ${YACC} ${YFLAGS} ncgen.y + mv y.tab.c ncgentab.c + mv y.tab.h ncgentab.h + +.include <bsd.prog.mk> + +# +# test "-b" option of ncgen +# +btest: $(PROG) test0.cdl test1.cdl + ${ENVIR} ./$(PROG) -b test1.cdl + ${ENVIR} $(NCDUMP) test1.nc > test2.cdl + @diff test1.cdl test2.cdl && \ + echo "*** $(PROG) -b test successful ***" + +# +# test "-c" option of ncgen +# +ctest: test1.cdl ctest0 + ${ENVIR} ./ctest0 # tests `-c' option, creates ctest0.nc + ${ENVIR} $(NCDUMP) -n test1 ctest0.nc > ctest1.cdl + @diff test1.cdl ctest1.cdl && \ + echo "*** $(PROG) -c test successful ***" + +ctest0: ncgen test0.cdl + ${ENVIR} ./$(PROG) -c -o ctest0.nc test0.cdl > test0.c + $(CC) $(CFLAGS) -o $@ test0.c ${LDFLAGS} + +# +# test "-f" option of ncgen +# +ftest: test1.cdl ftest0 + ${ENVIR} ./ftest0 + ${ENVIR} $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl + @if diff test1.cdl ftest1.cdl; then \ + echo "*** ncgen -f test successful ***"; \ + else \ + echo "*** ncgen -f test failed " \ + "(but roundoff differences are OK) ***"; \ + fi + +ftest0: $(PROG) test0.cdl netcdf.inc + ${ENVIR} ./$(PROG) -f -o ftest0.nc test0.cdl > test0.f; \ + $(FC) $(FFLAGS) ${CFLAGS} -o $@ test0.f ${LDFLAGS} + +test1.cdl: test0.nc + ${ENVIR} $(NCDUMP) -n test1 test0.nc > $@ + +test0.nc: $(PROG) test0.cdl + ${ENVIR} ./$(PROG) -b -o test0.nc test0.cdl + +netcdf.inc: + ln -s ../fortran/config/netcdf-fbsd.inc $@ |