#! /bin/sh
# Note that we must REMOVE links that are not writable, since the SYSV version
# of ln will otherwise ask for a y/no response.  The -f option means different
# things in the SYSV and non-SYSV systems, so we can't use that.
if [ ! -s ./examples/basic/upshot ] ; then (cd ./examples/basic/ ; /bin/rm -f upshot ; ln -s ../../bin/upshot  upshot >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./examples/perftest/aclocal.m4 ] ; then (cd ./examples/perftest/ ; /bin/rm -f aclocal.m4 ; ln -s ../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./examples/test/aclocal.m4 ] ; then (cd ./examples/test/ ; /bin/rm -f aclocal.m4 ; ln -s ../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./include/mpeexten.h ] ; then (cd ./include/ ; /bin/rm -f mpeexten.h ; ln -s ../mpe/mpeexten.h  mpeexten.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/point.h ] ; then (cd ./mpe/ ; /bin/rm -f point.h ; ln -s profiling/lib/point.h  point.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/examples/upshot ] ; then (cd ./mpe/profiling/examples/ ; /bin/rm -f upshot ; ln -s ../../../bin/upshot  upshot >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/nupshot/aclocal.m4 ] ; then (cd ./mpe/profiling/nupshot/ ; /bin/rm -f aclocal.m4 ; ln -s ../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/nupshot/logfiles ] ; then (cd ./mpe/profiling/nupshot/ ; /bin/rm -f logfiles ; ln -s ../upshot/logfiles  logfiles >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/nupshot/protofix.h ] ; then (cd ./mpe/profiling/nupshot/ ; /bin/rm -f protofix.h ; ln -s ../../../include/protofix.h  protofix.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/upshot/bin/aclocal.m4 ] ; then (cd ./mpe/profiling/upshot/bin/ ; /bin/rm -f aclocal.m4 ; ln -s ../../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/profiling/wrappergen/aclocal.m4 ] ; then (cd ./mpe/profiling/wrappergen/ ; /bin/rm -f aclocal.m4 ; ln -s ../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/requests.h ] ; then (cd ./mpe/ ; /bin/rm -f requests.h ; ln -s profiling/lib/requests.h  requests.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpe/aclocal.m4 ] ; then (cd ./mpe/ ; /bin/rm -f aclocal.m4 ; ln -s ../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpid/ch2/tr2.h ] ; then (cd ./mpid/ch2/ ; /bin/rm -f tr2.h ; ln -s ../util/tr2.h  tr2.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpid/ch2/sbcnst2.h ] ; then (cd ./mpid/ch2/ ; /bin/rm -f sbcnst2.h ; ln -s ../util/sbcnst2.h  sbcnst2.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpid/ch_meiko/dm.h ] ; then (cd ./mpid/ch_meiko/ ; /bin/rm -f dm.h ; ln -s dmmeiko.h  dm.h >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/ch_nc/dm.h ] ; then (cd ./mpid/ch_nc/ ; /bin/rm -f dm.h ; ln -s dmn3.h  dm.h >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/ch_nexus/mpid.h ] ; then (cd ./mpid/ch_nexus/ ; /bin/rm -f mpid.h ; ln -s ../ch2/mpid.h  mpid.h >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/ch_nexus/chnodename.c ] ; then (cd ./mpid/ch_nexus/ ; /bin/rm -f chnodename.c ; ln -s ../ch2/chnodename.c  chnodename.c >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/ch_nexus/chtick.c ] ; then (cd ./mpid/ch_nexus/ ; /bin/rm -f chtick.c ; ln -s ../ch2/chtick.c  chtick.c >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/ch_nexus/chdef.h ] ; then (cd ./mpid/ch_nexus/ ; /bin/rm -f chdef.h ; ln -s nexusdef.h  chdef.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpid/ch_p4/p4/aclocal.m4 ] ; then (cd ./mpid/ch_p4/p4/ ; /bin/rm -f aclocal.m4 ; ln -s ../../../aclocal.m4  aclocal.m4 >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./mpid/ch_p4/p4/alog/protofix.h ] ; then (cd ./mpid/ch_p4/p4/alog/ ; /bin/rm -f protofix.h ; ln -s ../../../../include/protofix.h  protofix.h >/dev/null 2>&1 ; ) ; fi
#if [ ! -s ./mpid/meiko/dm.h ] ; then (cd ./mpid/meiko/ ; /bin/rm -f dm.h ; ln -s dmmeiko.h  dm.h >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./src/env/dbxerr.c ] ; then (cd ./src/env/ ; /bin/rm -f dbxerr.c ; ln -s ../../mpe/dbxerr.c  dbxerr.c >/dev/null 2>&1 ; ) ; fi
if [ ! -s ./src/env/mpehname.c ] ; then (cd ./src/env/ ; /bin/rm -f mpehname.c ; ln -s ../../mpe/mpehname.c  mpehname.c >/dev/null 2>&1 ; ) ; fi
