0

I'm try to use Doxygen for Matlab-Code with Doxywizard. For this I take a perl-filter from MatlabCentral. I set:

FILTER_PATTERNS        = *.m=m2cpp.pl

The script put into the working directory. But Doxygen says:

sh: 1: m2cpp.pl: not found

I move the script around but the message still the same.

Where I have to put the script and how to setup the configuration right?

Community
  • 1
  • 1
Alex44
  • 3,597
  • 7
  • 39
  • 56
  • untested: put the script in directory, then add that directory to the `PATH` environment variable. Also make sure to mark the file as executable `chmod u+x m2cpp.pl` – Amro Jan 21 '14 at 13:36
  • also according to the [instructions](http://www.mathworks.com/matlabcentral/fileexchange/25925-using-doxygen-with-matlab), it seems you can specify the full path in the Doxyfile: `FILTER_PATTERN=*m=/path/to/m2cpp.pl` – Amro Jan 21 '14 at 13:38

1 Answers1

0

I had exactly this problem. The shell error you're getting is actually saying "Shell: m2cpp.pl, line 1: not found". In other words, the thing that is not being found is on line 1 of m2cpp.pl, not m2cpp.pl itself.

Assuming you have the version of m2cpp.pl that comes from MatlabCentral you'll probably find the first line is as follows:

#!/usr/bin/perl.exe

That is what is not being found, because the Perl executable is not called perl.exe on Linux.

Calling the script with the interpreter specified in FILTER_PATTERNS in your Doxyfile should fix it; i.e.

FILTER_PATTERNS        = *.m="perl m2cpp.pl"

for wherever you have m2cpp.pl.

(You could also modify the script directly, provided you comply with the licence agreement.)

Gosbos
  • 1
  • 2