]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - pm_filter
* Rename ikiwiki.pl so MakeMaker doesn't see it, and install it.
[git.ikiwiki.info.git] / pm_filter
1 #!/usr/bin/perl -i -p
3 BEGIN {
4         $prefix=shift;
5         $ver=shift;
6         $libdir=shift;
7 }
9 if (/INSTALLDIR_AUTOREPLACE/) {
10         $_=qq{my \$installdir="$prefix";};
11 }
12 elsif (/VERSION_AUTOREPLACE/) {
13         $_=qq{our \$version="$ver";};
14 }
15 elsif (/^use lib/) {
16         if (grep { $_ eq $libdir } @INC) {
17                 $_="";
18         }
19         else {
20                 $_="use lib '$libdir';\n";
21         }
22 }