--- loncom/homework/caparesponse/commands 2001/01/17 18:01:31 1.10 +++ loncom/homework/caparesponse/commands 2015/04/05 16:47:27 1.15 @@ -16,16 +16,25 @@ then then echo "" else - ln -s /usr/src/linux/include/asm /usr/include/asm + echo "ERROR. You are missing a necessary symbolic link." + echo "You should type, as superuser, a command like this:" + echo " ln -s /usr/src/linux/include/asm /usr/include/asm" + exit 1 fi if test -e /usr/include/linux then echo "" else - ln -s /usr/src/linux/include/linux /usr/include/linux + echo "ERROR. You are missing a necessary symbolic link." + echo "You should type, as superuser, a command like this:" + echo " ln -s /usr/src/linux/include/linux /usr/include/linux" + exit 1 fi fi -make -f Makefile clean +if test -f Makefile +then + make -f Makefile clean +fi mkdir capaFunctions path=`pwd` cd $CAPADIR/pProj @@ -33,8 +42,19 @@ make ARCH=LONCAPA libcapa cd $path cp $CAPADIR/pProj/LONCAPA/*.o capaFunctions swig -perl5 capa.i +dist=`perl ../../build/distprobe` +if [[ $dist == "redhat8" || $dist == "redhat9" ]] +then + cat capa_wrap.c | perl -pe '$_=~s-SWIGEXPORT\(void,boot_capa\)\(CV\* cv\)\;-SWIGEXPORT\(void,boot_capa\)\(pTHX_ CV\* cv\)\;-;' > capa_wrap.c.new + mv capa_wrap.c.new capa_wrap.c +fi cp Makefile.PL Makefile.pl perl Makefile.PL make -f Makefile cp blib/arch/auto/capa/capa.so . -perl capa.pm +perl capa.pm +swigver=`swig -version | perl -ne 'print $1 if /SWIG Version (\d+)\./i'` +if [[ $swigver > 2 ]] +then + echo -n "" > capa.bs +fi