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

CAPADIR=../../../CAPA

if test -f /etc/redhat-release
then
	if rpm -q swig
	then
		echo "Swig found.  Assuming it works..."
	else
		echo "ERROR ERROR: Swig must exist but doesn't!!!"
		echo "To get swig, go to"
		echo "http://install.lon-capa.org/3.1/SupplementalRPMS"
		echo "Install this RPM, swig-1.1p5-3.i386.rpm"
		exit 1
	fi
	if test -e /usr/include/asm
	then
		echo ""
	else
		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
		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
if test -f Makefile
then
	make -f Makefile clean
fi
mkdir capaFunctions
path=`pwd`
cd $CAPADIR/pProj
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
swigver=`swig -version | perl -ne 'print $1 if /SWIG Version (\d+)\./i'`
if [[ $swigver > 2 ]]
then
	echo -n "" > capa.bs
fi

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