Makefile.PL check if source directory found

81 Views Asked by At

I am using ExtUtils::MakeMaker to create Makefile.PL I added the following function to the makefile.PL to check if source directory is exist

sub  check_directory  {


my ($argv) = @_;

unless (defined $argv->{'source'} and -d $argv->{'source'}) {


    die 'directory not found ';
}

}

now when i run perl MakeFile.pl --source=/opt/src everything is ok

but after that whe i run make/dmake everything compiles ok but i am always get the "directory not found " message and "Error code 255" any idea why i get it and if there are different way to check if directory found when writting MakeFile.PL worth to mention if i remove the above code the compliation finish with success.

0

There are 0 best solutions below