From 1fae720d364681d7d1367ecce71abd780eecd087 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 1 Apr 2021 02:32:37 -0700 Subject: build: generate PublicInbox.pm with $VERSION Thanks to git-describe, we can generate and update this file to aid users in bug reporting. --- Makefile.PL | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index feb89ec1..129b082d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,6 +5,7 @@ use strict; use ExtUtils::MakeMaker; open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n"; chomp(my @manifest = (<$m>)); +push @manifest, 'lib/PublicInbox.pm'; # generated my @EXE_FILES = grep(m!^script/!, @manifest); my $v = {}; my $t = {}; @@ -139,7 +140,7 @@ WriteMakefile( NAME => 'PublicInbox', # n.b. camel-case is not our choice # XXX drop "PENDING" in .pod before updating this! - VERSION => '1.6.1', + VERSION => '1.7.0.PENDING', AUTHOR => 'Eric Wong ', ABSTRACT => 'public-inbox server infrastructure', @@ -242,13 +243,17 @@ Makefile.PL : MANIFEST # prefix + bindir matches git.git Makefile: prefix = \$(HOME) bindir = \$(prefix)/bin -symlink-install : +symlink-install : lib/PublicInbox.pm mkdir -p \$(bindir) lei=\$\$(realpath lei.sh) && cd \$(bindir) && \\ for x in \$(EXE_FILES); do \\ ln -sf "\$\$lei" \$\$(basename "\$\$x"); \\ done +pure_all :: lib/PublicInbox.pm +lib/PublicInbox.pm : FORCE + VERSION=\$(VERSION) \$(PERL) -w ./version-gen.perl + update-copyrights : \@case '\$(GNULIB_PATH)' in '') echo >&2 GNULIB_PATH unset; false;; esac git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \\ -- cgit v1.2.3-24-ge0c7