-
-
31 Jan 2018 15:34:37 UTC
- Distribution: Alien-gmake
- Module version: 0.21
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (4024 / 3 / 0)
- Kwalitee
Bus factor: 4- 100.00% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (15.6KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Alien::Base
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Alien::gmake - Find or build GNU Make
VERSION
version 0.21
SYNOPSIS
use Alien::gmake (); use Env qw( @PATH ); unshift @ENV, Alien::gmake->bin_dir; my $gmake = Alien::gmake->exe; system $gmake, 'all'; system $gmake, 'install';
Or with Alien::Build::ModuleBuild:
use Alien::Base::ModuleBuild; Alien::Base::ModuleBuild->new( ... alien_bin_requires => { 'Alien::gmake' => '0.09', }, alien_build_commands => { "%{gmake}", }, alien_install_commands => { "%{gmake} install", }, ... )->create_build_script;
DESCRIPTION
Some packages insist on using GNU Make. Some platforms refuse to come with GNU Make. Sometimes you just want to be able to build packages that require GNU Make without having to check the version of Make each time. This module is for that. It uses the system provided GNU Make if it can be found. Otherwise it will download and install it into a directory not normally in your path so that it can be used when you
use Alien::gmake
. This way you can use it when you need it, but not muck up your environment when you don't.If possible, it is better to fix the package so that it doesn't require GNU make extensions, making it more portable. Unfortunately, sometimes this isn't an option.
This class is a subclass of Alien::Base, so all of the methods documented there should work with this class.
METHODS
exe
my $gmake = Alien::gmake->exe;
Return the "name" of GNU make. Normally this is either
make
orgmake
. On Windows (and possibly other platforms), it may be the full path to the GNU make executable.To be usable on all platforms you will have to first add directories returned from
bin_dir
to yourPATH
, for example:use Alien::gmake (); use Env qw( @PATH ); unshift @PATH, Alien::gmake->bin_dir; system "@{[ Alien::gmake->exe ]}"; system "@{[ Alien::gmake->exe ]} install";
bin_dir
my @dir = Alien::gmake->bin_dir;
Returns the list of directories that should be added to
PATH
in order for the shell to find GNU make. If GNU make is already in thePATH
, this will return the empty list. For example:use Alien::gmake (); use Env qw( @PATH ); unshift @PATH, Alien::gmake->bin_dir;
HELPERS
gmake
%{gmake}
Returns either make or gmake depending on how GNU make is called on your system.
AUTHOR
Graham Ollis <plicease@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Alien::gmake, copy and paste the appropriate command in to your terminal.
cpanm Alien::gmake
perl -MCPAN -e shell install Alien::gmake
For more information on module installation, please visit the detailed CPAN module installation guide.