"Fossies" - the Fresh Open Source Software Archive

Member "pfstools-2.2.0/cmake/cygmex.sh" (12 Aug 2021, 620 Bytes) of package /linux/privat/pfstools-2.2.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 # This is a script of tricks to compile matlab interface with mex and Visual Studio when executed from cygwin
    3 
    4 mexargs=""
    5 
    6 for arg in $*; do 
    7     if [[ $arg == *"/"* ]]; then
    8         if [[ $arg == "-I"* ]]; then
    9             conv_arg="-I`cygpath -m ${arg:2}`"
   10         elif [[ $arg == "-L"* ]]; then
   11             conv_arg="-L`cygpath -m ${arg:2}`"
   12         else
   13             conv_arg=`cygpath -m $arg`
   14         fi
   15     else
   16         conv_arg=$arg
   17     fi  
   18     if [[ $conv_arg == *".cpp.o" ]]; then
   19         conv_arg=`echo ${conv_arg%.cpp.o}.obj | sed 's/__\/pfs//g'`             
   20     fi
   21     mexargs="$mexargs $conv_arg"
   22 done
   23 
   24 #echo "Running command: @MATLAB_MEX_EXE@ $mexargs"
   25 
   26 "@MATLAB_MEX_EXE@" $mexargs
   27 
   28