summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-24 01:04:22 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-24 01:43:50 +0100
commit5c10d34a99f5c4c1eac28aca58d5d7e414fd91f2 (patch)
tree14400356327c6b30bacc991d059cb4e90d74b5bd /dgit
parentdc204aadf2b4afa84fd002597041fc9e5b981d83 (diff)
Build system substitutions, for absurdities
* Introduce absurddir, which is where the absurdities will go * Substitute the absurddir into the dgit script during make all * Install the substituted scripts rather than the originals in make install * Provide a default in dgit, based on $0 * Clean the substitutions up in make clean Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit6
1 files changed, 6 insertions, 0 deletions
diff --git a/dgit b/dgit
index 5fa500c..344d006 100755
--- a/dgit
+++ b/dgit
@@ -41,6 +41,7 @@ use Carp;
use Debian::Dgit;
our $our_version = 'UNRELEASED'; ###substituted###
+our $absurdity = undef; ###substituted###
our @rpushprotovsn_support = qw(4 3 2); # 4 is new tag format
our $protovsn;
@@ -146,6 +147,11 @@ our @ourdscfield = qw(Dgit Vcs-Dgit-Master);
our $csuite;
our $instead_distro;
+if (!defined $absurdity) {
+ $absurdity = $0;
+ $absurdity =~ s{/[^/]+$}{/absurd} or die;
+}
+
sub debiantag ($$) {
my ($v,$distro) = @_;
return $tagformatfn->($v, $distro);