+2001-02-26 Akim Demaille <akim@epita.fr>
+
+ * automake.in: Use File::Basename.
+ (&dirname, &basename): Remove.
+
+
2001-02-26 Akim Demaille <akim@epita.fr>
* automake.in ($me): New.
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.
################################################################
-# $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)