Giter Club home page Giter Club logo

perl-module-build-xsutil's Introduction

Build Status

NAME

Module::Build::XSUtil - A Module::Build class for building XS modules

SYNOPSIS

Use in your Build.PL

use strict;
use warnings;
use Module::Build::XSUtil;

my $builder = Module::Build::XSUtil->new(
    dist_name            => 'Your-XS-Module',
    license              => 'perl',
    dist_author          => 'Your Name <[email protected]>',
    dist_version_from    => 'lib/Your/XS/Module',
    generate_ppport_h    => 'lib/Your/XS/ppport.h',
    generate_xshelper_h  => 'lib/Your/XS/xshelper.h',
    needs_compiler_c99   => 1,
);

$builder->create_build_script();

Use in custom builder module.

package builder::MyBuilder;
use strict;
use warnings;
use base 'Module::Build::XSUtil';

sub new {
    my ($class, %args) = @_;
    my $self = $class->SUPER::new(
        %args,
        generate_ppport_h    => 'lib/Your/XS/ppport.h',
        generate_xshelper_h  => 'lib/Your/XS/xshelper.h',
        needs_compiler_c99   => 1,
    );
    return $self;
}

1;

DESCRIPTION

Module::Build::XSUtil is subclass of Module::Build for support building XS modules.

This is a list of a new parameters in the Module::Build::new method:

  • needs_compiler_c99

    This option checks C99 compiler's availability. If it's not available, Build.PL exits by 0.

  • needs_compiler_cpp

    This option checks C++ compiler's availability. If it's not available, Build.PL exits by 0.

    In addition, append 'extra_compiler_flags' and 'extra_linker_flags' for C++.

  • generate_ppport_h

    Genereate ppport.h by Devel::PPPort.

  • generate_xshelper_h

    Genereate xshelper.h which is a helper header file to include EXTERN.h, perl.h, XSUB.h and ppport.h, and defines some portability stuff which are not supported by ppport.h.

    It is porting from Module::Install::XSUtil.

  • cc_warnings

    Enable compiler warnings flag. It is enable by default.

  • -g options

    If invoke Build.PL with '-g' option, It will build with debug options.

SEE ALSO

Module::Install::XSUtil

LICENSE

Copyright (C) Hideaki Ohno.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Hideaki Ohno <hide.o.j55 {at} gmail.com>

perl-module-build-xsutil's People

Contributors

hideo55 avatar jkeenan avatar skaji avatar syohex avatar tokuhirom avatar vpit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.