File:  [LON-CAPA] / loncom / homework / caparesponse / commands
Revision 1.15: download - view: text, annotated - select for diffs
Sun Apr 5 16:47:27 2015 UTC (9 years, 1 month ago) by raeburn
Branches: MAIN
CVS tags: version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, HEAD
- Eliminate ERROR (missing capa.bs) in WARNINGS when running make install
  on Fedora21 and SuSE 13.2 (swig 3).
  - Empty capa.bs file added since swig 3 does not create one, to satisfy
    entry for loncom/homework/caparesponse/capa.bs in loncapafiles.lpml

    1: CAPADIR=../../../CAPA
    2: 
    3: if test -f /etc/redhat-release
    4: then
    5: 	if rpm -q swig
    6: 	then
    7: 		echo "Swig found.  Assuming it works..."
    8: 	else
    9: 		echo "ERROR ERROR: Swig must exist but doesn't!!!"
   10: 		echo "To get swig, go to"
   11: 		echo "http://install.lon-capa.org/3.1/SupplementalRPMS"
   12: 		echo "Install this RPM, swig-1.1p5-3.i386.rpm"
   13: 		exit 1
   14: 	fi
   15: 	if test -e /usr/include/asm
   16: 	then
   17: 		echo ""
   18: 	else
   19: 		echo "ERROR. You are missing a necessary symbolic link."
   20: 		echo "You should type, as superuser, a command like this:"
   21:                 echo "   ln -s /usr/src/linux/include/asm /usr/include/asm"
   22: 		exit 1
   23: 	fi
   24: 	if test -e /usr/include/linux
   25: 	then
   26: 		echo ""
   27: 	else
   28: 		echo "ERROR. You are missing a necessary symbolic link."
   29: 		echo "You should type, as superuser, a command like this:"
   30:                 echo "   ln -s /usr/src/linux/include/linux /usr/include/linux"
   31: 		exit 1
   32: 	fi
   33: fi
   34: if test -f Makefile
   35: then
   36: 	make -f Makefile clean
   37: fi
   38: mkdir capaFunctions
   39: path=`pwd`
   40: cd $CAPADIR/pProj
   41: make ARCH=LONCAPA libcapa
   42: cd $path
   43: cp $CAPADIR/pProj/LONCAPA/*.o capaFunctions
   44: swig -perl5 capa.i 
   45: dist=`perl ../../build/distprobe`
   46: if [[ $dist == "redhat8" || $dist == "redhat9" ]] 
   47: then
   48: 	cat capa_wrap.c | perl -pe '$_=~s-SWIGEXPORT\(void,boot_capa\)\(CV\* cv\)\;-SWIGEXPORT\(void,boot_capa\)\(pTHX_ CV\* cv\)\;-;' > capa_wrap.c.new
   49: 	mv capa_wrap.c.new capa_wrap.c
   50: fi
   51: cp Makefile.PL Makefile.pl
   52: perl Makefile.PL 
   53: make -f Makefile 
   54: cp blib/arch/auto/capa/capa.so . 
   55: perl capa.pm
   56: swigver=`swig -version | perl -ne 'print $1 if /SWIG Version (\d+)\./i'`
   57: if [[ $swigver > 2 ]]
   58: then
   59: 	echo -n "" > capa.bs
   60: fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>