mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-09 08:11:38 +08:00
06a11e51df
NCRCFILE. Note that the value of this environment variable should be the absolute path of the rc file, not the path to its containing directory.
96 lines
2.6 KiB
Plaintext
Executable File
96 lines
2.6 KiB
Plaintext
Executable File
OCDIR=/home/dmh/git/oc
|
|
#OCDIR=f:/git/oc
|
|
|
|
THISDIR=../oc2
|
|
|
|
# Make consistent with Makefile.am
|
|
SRC=oc.c \
|
|
daplex.c dapparse.c daptab.c \
|
|
occlientparams.c occompile.c occurlfunctions.c \
|
|
ocdata.c ocdebug.c ocdump.c \
|
|
ocinternal.c ocnode.c \
|
|
ochttp.c \
|
|
ocrc.c ocread.c ocutil.c \
|
|
ocbytes.c oclist.c ocuri.c oclog.c \
|
|
occurlflags.c \
|
|
xxdr.c
|
|
|
|
HDRS=oc.h ocx.h \
|
|
dapparselex.h daptab.h \
|
|
occlientparams.h occompile.h occonstraints.h occurlfunctions.h \
|
|
ocdata.h ocdatatypes.h ocdebug.h ocdump.h \
|
|
ocinternal.h ocnode.h \
|
|
ochttp.h ocread.h ocutil.h \
|
|
ocbytes.h oclist.h ocuri.h oclog.h \
|
|
xxdr.h
|
|
|
|
DOCS=docs/ocauth.html
|
|
|
|
MISC=dap.y
|
|
|
|
FILES=${HDRS} ${SRC} ${MISC} ${DOCS}
|
|
|
|
all::
|
|
|
|
makeoc::
|
|
rm -f ${THISDIR}/*.[chy]
|
|
for file in ${FILES} ; do \
|
|
echo "${OCDIR}/$$file" ; \
|
|
f="${OCDIR}/$$file" ; \
|
|
base=`basename $$f` ; \
|
|
cat $$f | tr -d '
|
|
' >${THISDIR}/$$base; \
|
|
done
|
|
rm -f ocdebug.h XGetopt.[ch]
|
|
sed -e 's|^[#]if 1|#if 0|g' \
|
|
< ${OCDIR}/ocdebug.h | tr -d '\r' >./ocdebug.h
|
|
# This should match the bison command in Makefile.am
|
|
rm -f dap.tab.c dap.tab.h
|
|
bison --debug -d -p dap dap.y
|
|
mv dap.tab.c daptab.c; mv dap.tab.h daptab.h
|
|
|
|
diffoc::
|
|
@if ! test -e ${OCDIR} ; then echo "${OCDIR} not found"; exit ; fi
|
|
@for file in ${FILES} ; do \
|
|
f="${OCDIR}/$$file" ; \
|
|
x=`basename $$f|tr -d '
|
|
' ` ; \
|
|
if test "x$${x}" = "xdaptab.c" -o "x$${x}" = "xdaptab.h" ; then echo "ignore: $${x}"; continue; fi ;\
|
|
if ! test -e ${THISDIR}/$$x ; then \
|
|
echo "Missing file: $$x"; \
|
|
fi ; \
|
|
if test -e ${THISDIR}/$$x -a -e ${OCDIR}/$$x ; then \
|
|
if ! diff --brief -wBb ${THISDIR}/$$x $$f > /dev/null ; then \
|
|
echo diff -wBb ${THISDIR}/$$x $$f ;\
|
|
diff -w ${THISDIR}/$$x $$f ; \
|
|
fi; \
|
|
fi; \
|
|
done
|
|
|
|
olddiff::
|
|
if ! test -e ${OCDIR} ; then echo "${OCDIR} not found"; exit ; fi
|
|
for file in ${FILES} ; do \
|
|
f="${OCDIR}/$$file" ; \
|
|
x=`basename $$f | tr -d '
|
|
' ` ; \
|
|
if test "x$${x}" = "xdaptab.c" -o "x$${x}" = "xdaptab.h" ; then echo "ignore: $${x}"; continue; fi ;\
|
|
if test -e ${THISDIR}/$$x -a -e ${OCDIR}/$$x ; then \
|
|
diff --brief -wBb ${THISDIR}/$$x $$f ; \
|
|
else \
|
|
echo "Only in ${OCDIR}: $$x"; \
|
|
fi; \
|
|
done
|
|
for file in ${FILES} ; do \
|
|
f="${OCDIR}/$$file" ; \
|
|
x=`basename $$f|tr -d '
|
|
' ` ; \
|
|
if test "x$${x}" = "xdaptab.c" -o "x$${x}" = "xdaptab.h" ; then echo "ignore: $${x}"; continue; fi ;\
|
|
if test -e ${THISDIR}/$$x -a -e ${OCDIR}/$$x ; then \
|
|
if ! diff --brief -wBb ${THISDIR}/$$x $$f > /dev/null ; then \
|
|
echo diff -wBb ${THISDIR}/$$x $$f ;\
|
|
diff -w ${THISDIR}/$$x $$f ; \
|
|
fi; \
|
|
fi; \
|
|
done
|
|
|
|
backoc::
|
|
for f in ${FILES} ; do \
|
|
cp -f ./$$f ${OCDIR}/$$f ; \
|
|
done
|