<< Google Print | Home | Software Version Numbers Are Lame >>

ActiveState Perl Under Cygwin Bash

On my current project, we use MPC to generate Visual Studio .NET 2003 solution files. It's a set of Perl scripts. Earlier this month, MPC started to fail under Cygwin Perl, and I have to uninstall it and start using ActiveState Perl. To keep on doing what I do, running the Perl scripts from the Cygwin bash shell, I wrote a little bash script, named it perl and put its directory in the PATH in front of the ActiveState Perl's directory:

#!/bin/bash
#
# Call ActiveState Perl with path-like parameters converted from
# Cygwin format to Windows format.
#
ACTIVESTATE_PERL=C:/Perl/bin/perl.exe

declare -a args
declare -i index

until [ -z "$1" ]
do
  if echo $1 | egrep -q '^/|^\.'
  then
    args[index]=`cygpath -a -w $1`
  else
    args[index]=$1
  fi
  ((index++))
  shift
done

$ACTIVESTATE_PERL ${args[@]}
Tags :


Re: ActiveState Perl Under Cygwin Bash

hm, you said you uninstalled cygwin already ? i guess the perl script is to generate the studio file ?

Re: ActiveState Perl Under Cygwin Bash

I uninstalled the Perl that came with Cygwin, not the whole Cygwin.

MPC is used to generate the project files and solution files needed by Visual Studio on Windows and the Makefiles needed by GCC on Solaris. Of course you need to write a *.mpc file as the input to MPC. But that file is much simpler to write and maintain.

See the online MPC manual for all the details.


Add a comment Send a TrackBack