Cpanel-JSON-XS

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

      },
      x_contributors => [
        'Ashley Willis <ashleyw@cpan.org>',
        'Chip Salzenberg <chip@pobox.com>',
        'Christopher J. Madsen <cjm@cjmweb.net>',
        'Colin Kuskie <colink@perldreamer.com>',
        'Daniel Dragan <bulk88@hotmail.com>',
        'David Golden <xdg@xdg.me>',
        'David Steinbrunner <dsteinbrunner@pobox.com>',
        'E. Choroba <choroba@users.noreply.github.com>',
        'Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>',
        'Gilmar Santos Jr <jgasjr@gmail.com>',
        'Graham Knop <haarg@haarg.org>',
        'James Rouzier <rouzier@gmail.com>',
        'J. Nick Koston <nick@cpanel.net>',
        'Karen Etheridge <ether@cpan.org>',
        'Lubomir Rintel <lkundrak@v3.sk>',
        'Lukas Mai <l.mai@web.de>',
        'Matthew Horsfall <wolfsage@gmail.com>',
        'Michael G. Schwern <schwern@pobox.com>',
        'Pali <pali@cpan.org>',
        'Patrick Cronin <PatrickCronin@users.noreply.github.com>',
        'Quim Rovira <quim@rovira.cat>',
        'Sergey Aleynikov <sergey.aleynikov@gmail.com>',
        'Syohei Yoshida <syohex@gmail.com>',
        'tevfik1903 <tevfik1903@users.noreply.github.com>',
      ],
    }
   ) : ()),
  SIGN  => 1,
);

package MY;
sub test {
  local $_ = shift->SUPER::test(@_);
  eval { require common::sense; };
  unless ($@) {
    s/TEST_FILES = /TEST_FILES = -Mcommon::sense /;
  }
  $_
}

sub top_targets {
  local $_ = shift->SUPER::top_targets(@_);
  s/\$\(FIRST_MAKEFILE\) blibdirs/\$(FIRST_MAKEFILE\) blibdirs README/;
  $_
}

sub depend {
  "
README : \$(VERSION_FROM)
	pod2text \$(VERSION_FROM) > README

release-test : xtest dist
	if test \"\$(shell git rev-parse --abbrev-ref HEAD)\" != \"master\" || \\
           test \"\$(shell git diff --raw)\" != \"\" || \\
           test \"\$(shell git diff --cached --raw)\" != \"\" ; then \\
          echo 'You are not on a clean master branch, aborting.'; \\
          exit 1; \\
	fi
	if test \"\$(shell git ls --show-signature -n 1 | head -n2 | tail -n1 | cut -c1-5)\" != \"gpg: \" ; then \\
            echo 'need git commit with -S'; \\
            exit 1; \\
	fi
	if test \"\$(shell git ls --no-show-signature -n 1 | head -n5 | tail -n1 | cut -c5-11)\" != \"Release\" ; then \\
            echo 'need git commit with -m Release'; \\
            exit 1; \\
	fi
	echo -git tag -f \$(VERSION)
	echo cpan-upload \$(DISTVNAME).tar\$(SUFFIX)
	echo git push
	echo git push --tags

release : xtest dist
	if test \"\$(shell git rev-parse --abbrev-ref HEAD)\" != \"master\" || \\
           test \"\$(shell git diff --raw)\" != \"\" || \\
           test \"\$(shell git diff --cached --raw)\" != \"\" ; then \\
          echo 'You are not on a clean master branch, aborting.'; \\
          exit 1; \\
	fi
	if test \"\$(shell git ls --show-signature -n 1 | head -n2 | tail -n1 | cut -c1-5)\" != \"gpg: \" ; then \\
            echo 'need git commit with -S'; \\
            exit 1; \\
	fi
	if test \"\$(shell git ls --no-show-signature -n 1 | head -n5 | tail -n1 | cut -c5-11)\" != \"Release\" ; then \\
            echo 'need git commit with -m Release'; \\
            exit 1; \\
	fi
	-git tag -f \$(VERSION)
	cpan-upload \$(DISTVNAME).tar\$(SUFFIX)
	git push
	git push --tags

xtest :: test
	\$(MAKE) test TEST_FILES=xt/*.t

const-c.inc const-xs.inc : Makefile.PL

# versioned gcc needs overrides
GCOV = gcov
test_cover :: pure_all
	\$(RM_RF) cover_db
	+\$(PERLRUNINST) -S cover -test

test_coveralls :: pure_all
	+\$(PERLRUNINST) -S cover -test -report coveralls

gcov : \$(BASEEXT).c.gcov \$(BASEEXT).gcov cover_db/\$(BASEEXT)-xs.html

\$(BASEEXT).c.gcov \$(BASEEXT).xs.gcov : \$(BASEEXT).xs
	\$(MAKE) CCFLAGS=\"\$(CCFLAGS) -fprofile-arcs -ftest-coverage\" LDDLFLAGS=\"\$(LDDLFLAGS) -fprofile-arcs -ftest-coverage\"
	\$(GCOV) \$(BASEEXT).c \$(BASEEXT).xs

cover_db/\$(BASEEXT)-xs.html : \$(BASEEXT).xs.gcov
	PERL5OPT=-MDevel::Cover make test
	-$^X -S gcov2perl \$(BASEEXT).c.gcov \$(BASEEXT).xs.gcov
	$^X -S cover

gprof :
	\$(MAKE) CCFLAGS=\"\$(CCFLAGS) -pg\" LDDLFLAGS=\"\$(LDDLFLAGS) -pg\"
"
}



( run in 1.148 second using v1.01-cache-2.11-cpan-e1769b4cff6 )