2015-05-30 07:31:42 +08:00
|
|
|
# OCDIR is assumed to have been set
|
|
|
|
TST=`if test "x$OCDIR" = x ; then echo "OCDIR not defined"; exit 1 fi`
|
|
|
|
TST=`echo "OCDIR=$OCDIR"`
|
2014-12-25 01:22:47 +08:00
|
|
|
|
2012-08-01 04:34:13 +08:00
|
|
|
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 \
|
2014-12-25 01:22:47 +08:00
|
|
|
occurlflags.c \
|
2012-08-01 04:34:13 +08:00
|
|
|
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 \
|
2014-12-25 01:22:47 +08:00
|
|
|
ochttp.h ocread.h ocutil.h \
|
2012-08-01 04:34:13 +08:00
|
|
|
ocbytes.h oclist.h ocuri.h oclog.h \
|
|
|
|
xxdr.h
|
|
|
|
|
2015-03-03 11:26:39 +08:00
|
|
|
DOCS=docs/ocauth.html
|
|
|
|
|
|
|
|
MISC=dap.y
|
|
|
|
|
|
|
|
FILES=${HDRS} ${SRC} ${MISC} ${DOCS}
|
2012-08-01 04:34:13 +08:00
|
|
|
|
|
|
|
all::
|
|
|
|
|
|
|
|
makeoc::
|
|
|
|
rm -f ${THISDIR}/*.[chy]
|
|
|
|
for file in ${FILES} ; do \
|
2014-12-01 11:30:23 +08:00
|
|
|
echo "${OCDIR}/$$file" ; \
|
2012-08-01 04:34:13 +08:00
|
|
|
f="${OCDIR}/$$file" ; \
|
|
|
|
base=`basename $$f` ; \
|
|
|
|
cat $$f | tr -d '
' >${THISDIR}/$$base; \
|
|
|
|
done
|
2014-07-02 00:39:18 +08:00
|
|
|
rm -f ocdebug.h XGetopt.[ch]
|
2012-08-01 04:34:13 +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
|
|
|
|
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
|
|
|
|
|
2015-07-16 06:19:14 +08:00
|
|
|
changed:
|
|
|
|
${MAKE} -f Make0 NAMEONLY=1 diffoc
|
|
|
|
|
2012-08-01 04:34:13 +08:00
|
|
|
diffoc::
|
2015-03-03 11:26:39 +08:00
|
|
|
@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 \
|
2015-07-16 06:19:14 +08:00
|
|
|
if test "x${NAMEONLY}" = x1 ; then \
|
|
|
|
echo "$$x" ;\
|
|
|
|
else \
|
|
|
|
echo diff -wBb ${THISDIR}/$$x $$f ;\
|
|
|
|
diff -w ${THISDIR}/$$x $$f ; \
|
|
|
|
fi; \
|
2015-03-03 11:26:39 +08:00
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
olddiff::
|
2012-08-01 04:34:13 +08:00
|
|
|
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
|
2014-06-27 06:40:08 +08:00
|
|
|
|
2014-06-26 12:18:22 +08:00
|
|
|
backoc::
|
|
|
|
for f in ${FILES} ; do \
|
|
|
|
cp -f ./$$f ${OCDIR}/$$f ; \
|
|
|
|
done
|