netcdf-c/oc/Make0

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2010-06-03 21:24:43 +08:00
THISDIR=../oc
2011-12-11 07:18:13 +08:00
OCDIR=/home/dmh/svn/oc
2010-06-03 21:24:43 +08:00
all::
makeoc::
rm -f ${THISDIR}/*.[chy]
2010-07-20 02:06:09 +08:00
for f in ${OCDIR}/*.[chy] ; do \
base=`basename $$f` ; \
cat $$f | tr -d ' ' >${THISDIR}/$$base; \
done
2010-07-20 02:06:09 +08:00
rm -f ce.y ceparse.c celex.c ceparselex.h
rm -f octest.c config.h occompile.[ch]
rm -f ocdebug.h
2012-02-04 05:31:50 +08:00
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
2011-12-14 03:40:22 +08:00
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
2011-12-06 04:53:43 +08:00
# # Temporary
# sed -e 's|dapdecode(parsestate->lexstate,|(|' \
# < ${OCDIR}/dap.y | tr -d '\r' >./dap.y
2010-06-03 21:24:43 +08:00
diffoc::
2010-07-20 02:06:09 +08:00
if ! test -e ${OCDIR} ; then echo "${OCDIR} not found"; exit ; fi
for f in ${OCDIR}/*.[chy] ; do \
2010-06-03 21:24:43 +08:00
x=`basename $$f | tr -d ' ' ` ; \
2011-12-06 04:53:43 +08:00
if test "x$${x}" = "xdaptab.c" -o "x$${x}" = "xdaptab.h" ; then echo "ignore: $${x}"; continue; fi ;\
2010-07-20 02:06:09 +08:00
if test -e ${THISDIR}/$$x -a -e ${OCDIR}/$$x ; then \
2011-04-17 04:56:36 +08:00
diff --brief -wBb ${THISDIR}/$$x $$f ; \
2010-07-20 02:06:09 +08:00
else \
echo "Only in ${OCDIR}: $$x"; \
2010-06-03 21:24:43 +08:00
fi; \
done
for f in ${OCDIR}/*.[chy] ; do \
x=`basename $$f|tr -d ' ' ` ; \
2011-12-06 04:53:43 +08:00
if test "x$${x}" = "xdaptab.c" -o "x$${x}" = "xdaptab.h" ; then echo "ignore: $${x}"; continue; fi ;\
2010-07-20 02:06:09 +08:00
if test -e ${THISDIR}/$$x -a -e ${OCDIR}/$$x ; then \
2011-04-17 04:56:36 +08:00
if ! diff --brief -wBb ${THISDIR}/$$x $$f > /dev/null ; then \
echo diff -wBb ${THISDIR}/$$x $$f ;\
diff -w ${THISDIR}/$$x $$f ; \
2010-06-03 21:24:43 +08:00
fi; \
fi; \
done