--- loncom/homework/caparesponse/commands 2003/04/15 15:48:18 1.13 +++ loncom/homework/caparesponse/commands 2018/06/11 13:12:34 1.16 @@ -43,7 +43,7 @@ cd $path cp $CAPADIR/pProj/LONCAPA/*.o capaFunctions swig -perl5 capa.i dist=`perl ../../build/distprobe` -if [ $dist = "redhat8" ] +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 @@ -52,4 +52,9 @@ cp Makefile.PL Makefile.pl perl Makefile.PL make -f Makefile cp blib/arch/auto/capa/capa.so . -perl capa.pm +perl -I . -f capa.pm +swigver=`swig -version | perl -ne 'print $1 if /SWIG Version (\d+)\./i'` +if [[ $swigver > 2 ]] +then + echo -n "" > capa.bs +fi