From b4fa04d80fda3f1d3e1287434ae9f068fab562c9 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 26 Feb 2001 09:51:26 +0000 Subject: [PATCH] * automake.in: Use File::Basename. (&dirname, &basename): Remove. --- ChangeLog | 6 ++++++ automake.in | 31 ++----------------------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index badf2e2c..2ebff2e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-02-26 Akim Demaille + + * automake.in: Use File::Basename. + (&dirname, &basename): Remove. + + 2001-02-26 Akim Demaille * automake.in ($me): New. diff --git a/automake.in b/automake.in index 7466de26..2b1859d3 100755 --- a/automake.in +++ b/automake.in @@ -29,9 +29,10 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}' require 5.005; +use File::Basename; use IO::File; -(my $me = $0) =~ s,.*[\\/],,; +my $me = basename ($0); # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that eg version 0.30 will print correctly. @@ -470,34 +471,6 @@ sub uniq (@) ################################################################ -# $DIRNAME -# &dirname ($FILE) -# ---------------- -# Return directory name of file. -sub dirname ($) -{ - my ($file) = @_; - my $sub; - - ($sub = $file) =~ s,/+[^/]+$,,g; - $sub = '.' if $sub eq $file; - return $sub; -} - - -# $BASENAME -# &basename ($FILE) -# ----------------- -# Return file name of a file. -sub basename ($) -{ - my ($file) = @_; - my $sub; - - ($sub = $file) =~s,^.*/+,,g; - return $sub; -} - # $BACKPATH # &backname ($REL-DIR) -- 2.43.5