#!/usr/bin/perl ########################################### # i -- Search for the next Makefile or # Makefile.PL somewhere up the hierarchy # and call 'make install' # Mike Schilli, 2002 (m@perlmeister.com) ########################################### use warnings; use strict; our $VERSION = "1.00"; our $CVSVERSION = '$Revision: 1.4 $'; use Cwd; while(!-f "Makefile" and !-f "Makefile.PL" and (my $cwd = getcwd()) ne "/") { print "Trying $cwd\n"; chdir(".."); } if(-f "Makefile") { system("make install"); } elsif(-f "Makefile.PL") { system("perl Makefile.PL; make install"); } else { print "Can't do it.\n"; } =cut =head1 NAME i - Call 'make install' on a Makefile or Makefile.PL up the hierarchy =head1 DOWNLOAD _SRC_HERE_ =head1 SYNOPSIS i =head1 OPTIONS =head1 DESCRIPTION C is to be used when you're working on a Perl module, are located in some subdirectory of it and want to call "make install" in the top directory. It will go upwards the directory hierarchy from where you are, looking for "Makefile" or "Makefile.PL" and call "make install" or "perl Makefile.PL; make install" if it finds one. =head1 LEGALESE Copyright 2002 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR 2002, Mike Schilli