Changeset 21678

Show
Ignore:
Timestamp:
08/01/08 14:26:21 (5 months ago)
Author:
audreyt
Message:

* Makefile.PL: More robust ~/.cabal detectino thanks to moritz++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Makefile.PL

    r21670 r21678  
    1717 
    1818my $setup_exe  = File::Spec->catfile('.', "Setup$Config{_exe}"); 
     19 
     20unlink $_ for qw(Setup.hi Setup.o); 
     21unlink $setup_exe; 
    1922system($ghc, qw(--make -O0), -o => $setup_exe, 'Setup.lhs'); 
    2023my $app_dir = `$setup_exe -d`; 
    2124chomp $app_dir; 
     25 
     26die "Cannot find application directory '$app_dir'; check to see if Setup.lhs compiles?\n" 
     27    unless $app_dir and -d $app_dir; 
    2228 
    2329my $bin_dir = File::Spec->catdir($app_dir, 'bin');