bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New coreutil? realpath - retrieve canonicalized absolute path


From: Sebastian Rasmussen
Subject: New coreutil? realpath - retrieve canonicalized absolute path
Date: Tue, 19 Jul 2005 02:25:04 +0200

Hi!

Below is a patch (against coreutils-cvs) that
implements a new coreutil of mine, realpath, that
more or less wraps the libc call realpath(3). This
is done in order to allow shell scripts or users
to retrieve an absolute path given a relative
path. Usage would be similar to basname and
dirname, but here's a terse usage example
anyway:

host% ls /usr/foo/directory /usr/foo/file
/usr/foo/directory  /usr/foo/file
host% cd /usr/foo
host% realpath directory
/usr/foo/directory
host% realpath ../foo/directory
/usr/foo/directory
host% realpath file
/usr/foo/file
host% realpath /usr/foo/file
/usr/foo/file

Hopefully I managed to patch all files that ought
to be changed when adding a new coreutil, but
unfortunately this made the patch large. The interesting hunks of the patch are at the top.
I'm looking forward to any suggestions or comments you may have.

Please keep me CC:ed as I'm not subscribing to
bug-coreutils.

/ Sebastian Rasmussen



diff -Npruw coreutils-cvs/src/realpath.c coreutils-cvs.patched/src/realpath.c
--- coreutils-cvs/src/realpath.c        1970-01-01 01:00:00.000000000 +0100
+++ coreutils-cvs.patched/src/realpath.c 2005-07-19 01:31:19.000000000 +0200
@@ -0,0 +1,116 @@
+/* realpath -- return canonicalized absolute pathname
+   Copyright (C) 2005 Sebastian Rasmussen.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* Usage: realpath name
+   NAME is a pathname.
+
+   ls /usr/foo/lossage/functions.l
+   => /usr/foo/lossage/functions.l
+   cd /usr/foo/lossage
+   realpath functions.l
+   => /usr/foo/lossage/functions.l */
+
+#include <config.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "system.h"
+#include "long-options.h"
+#include "error.h"
+#include "quote.h"
+
+/* The official name of this program (e.g., no `g' prefix).  */
+#define PROGRAM_NAME "realpath"
+
+#define AUTHORS "Sebastian Rasmussen"
+
+/* The name this program was run with. */
+char *program_name;
+
+void
+usage (int status)
+{
+  if (status != EXIT_SUCCESS)
+    fprintf (stderr, _("Try `%s --help' for more information.\n"),
+            program_name);
+  else
+    {
+      printf (_("\
+Usage: %s NAME\n\
+  or:  %s OPTION\n\
+"),
+             program_name, program_name);
+      fputs (_("\
+Print canonicalized absolute path to NAME.\n\
+\n\
+"), stdout);
+      fputs (HELP_OPTION_DESCRIPTION, stdout);
+      fputs (VERSION_OPTION_DESCRIPTION, stdout);
+      printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+    }
+  exit (status);
+}
+
+/* Remove SUFFIX from the end of NAME if it is there, unless NAME
+   consists entirely of SUFFIX. */
+
+int
+main (int argc, char **argv)
+{
+  char result[PATH_MAX];
+
+  initialize_main (&argc, &argv);
+  program_name = argv[0];
+  setlocale (LC_ALL, "");
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+
+  atexit (close_stdout);
+
+  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
+                     usage, AUTHORS, (char const *) NULL);
+  /* The above handles --help and --version.
+     Since there is no other invocation of getopt, handle `--' here.  */
+  if (argc > 1 && STREQ (argv[1], "--"))
+    {
+      --argc;
+      ++argv;
+    }
+
+  if (argc <= 1 || argc > 3)
+    {
+      error (0, 0, (argc <= 1 ? _("too few arguments")
+                   : _("too many arguments")));
+      usage (EXIT_FAILURE);
+    }
+
+  if (realpath (argv[1], result) == NULL)
+    {
+      error (EXIT_FAILURE, errno, "%s", quote (argv[1]));
+    }
+
+  if (strnlen (result, PATH_MAX) == PATH_MAX)
+    {
+      result[PATH_MAX - 1] = '\0';
+    }
+
+  puts (result);
+
+  exit (EXIT_SUCCESS);
+}
diff -Npruw coreutils-cvs/tests/realpath/basic coreutils-cvs.patched/tests/realpath/basic
--- coreutils-cvs/tests/realpath/basic  1970-01-01 01:00:00.000000000 +0100
+++ coreutils-cvs.patched/tests/realpath/basic 2005-07-18 18:26:43.000000000 +0200
@@ -0,0 +1,55 @@
+#!/bin/sh
+# -*-perl-*-
+
+: ${PERL=perl}
+: ${srcdir=.}
+
+$PERL -e 1 > /dev/null 2>&1 || {
+  echo 1>&2 "$0: configure didn't find a usable version of Perl," \
+    "so can't run this test"
+  exit 77
+}
+
+d=$srcdir/..
+exec $PERL -w -I$d -MFetish -- - << \EOF
+require 5.003;
+use strict;
+
+(my $program_name = $0) =~ s|.*/||;
+
+# Turn off localisation of executable's ouput.
address@hidden(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
+my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
+
+use Cwd 'abs_path';
+
+my @Tests =
+    (
+     ['fail-1', {ERR => "$prog: too few arguments\n"
+       . "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
+     ['fail-2', qw(a a a), {ERR => "$prog: too many arguments\n"
+       . "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
+
+     ['a', qw(.),          {OUT => abs_path($ENV{PWD})}],
+    );
+
+# Append a newline to end of each expected `OUT' string.
+my $t;
+foreach $t (@Tests)
+  {
+    my $arg1 = $t->[1];
+    my $e;
+    foreach $e (@$t)
+      {
+       $e->{OUT} = "$e->{OUT}\n"
+         if ref $e eq 'HASH' and exists $e->{OUT};
+      }
+  }
+
+my $save_temps = $ENV{SAVE_TEMPS};
+my $verbose = $ENV{VERBOSE};
+
+my $fail = run_tests ($program_name, $prog, address@hidden, $save_temps, $verbose);
+exit $fail;
+EOF
diff -Npruw coreutils-cvs/AUTHORS coreutils-cvs.patched/AUTHORS
--- coreutils-cvs/AUTHORS       2004-11-04 00:10:50.000000000 +0100
+++ coreutils-cvs.patched/AUTHORS       2005-07-18 18:27:08.000000000 +0200
@@ -56,6 +56,7 @@ printenv: David MacKenzie, Richard Mlyna
printf: David MacKenzie
ptx: F. Pinard
pwd: Jim Meyering
+realpath: Sebastian Rasmussen
readlink: Dmitry V. Levin
rm: Paul Rubin, David MacKenzie, Richard Stallman, Jim Meyering
rmdir: David MacKenzie

diff -Npruw coreutils-cvs/README coreutils-cvs.patched/README
--- coreutils-cvs/README        2005-01-08 10:00:08.000000000 +0100
+++ coreutils-cvs.patched/README        2005-07-18 18:26:43.000000000 +0200
@@ -11,9 +11,9 @@ The programs that can be built with this
  df dir dircolors dirname du echo env expand expr factor false fmt fold
  ginstall groups head hostid hostname id join kill link ln logname ls
  md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
-  printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
-  split stat stty su sum sync tac tail tee test touch tr true tsort tty
-  uname unexpand uniq unlink uptime users vdir wc who whoami yes
+  printenv printf ptx pwd realpath readlink rm rmdir seq sha1sum shred
+  sleep sort split stat stty su sum sync tac tail tee test touch tr true
+  tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes

See the file NEWS for a list of major changes in the current release.

diff -Npruw coreutils-cvs/configure coreutils-cvs.patched/configure
--- coreutils-cvs/configure     2005-07-12 18:44:52.000000000 +0200
+++ coreutils-cvs.patched/configure     2005-07-18 20:47:19.000000000 +0200
@@ -52985,7 +52277,7 @@ _ACEOF



- ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile po/Makefile.in src/Makefile tests/Makefile tests/basename/Makefile tests/chgrp/Makefile tests/chmod/Makefile tests/chown/Makefile tests/cp/Makefile tests/cut/Makefile tests/date/Makefile tests/dd/Makefile tests/dircolors/Makefile tests/du/Makefile tests/expr/Makefile tests/factor/Makefile tests/fmt/Makefile tests/head/Makefile tests/install/Makefile tests/join/Makefile tests/ln/Makefile tests/ls-2/Makefile tests/ls/Makefile tests/md5sum/Makefile tests/misc/Makefile tests/mkdir/Makefile tests/mv/Makefile tests/od/Makefile tests/pr/Makefile tests/readlink/Makefile tests/rm/Makefile tests/rmdir/Makefile tests/seq/Makefile tests/sha1sum/Makefile tests/shred/Makefile tests/sort/Makefile tests/stty/Makefile tests/sum/Makefile tests/tac/Makefile tests/tail-2/Makefile tests/tail/Makefile tests/tee/Makefile tests/test/Makefile tests/touch/Makefile tests/tr/Makefile tests/tsort/Makefile tests/unexpand/Makefile tests/uniq/Makefile tests/wc/Makefile" + ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile po/Makefile.in src/Makefile tests/Makefile tests/basename/Makefile tests/chgrp/Makefile tests/chmod/Makefile tests/chown/Makefile tests/cp/Makefile tests/cut/Makefile tests/date/Makefile tests/dd/Makefile tests/dircolors/Makefile tests/du/Makefile tests/expr/Makefile tests/factor/Makefile tests/fmt/Makefile tests/head/Makefile tests/install/Makefile tests/join/Makefile tests/ln/Makefile tests/ls-2/Makefile tests/ls/Makefile tests/md5sum/Makefile tests/misc/Makefile tests/mkdir/Makefile tests/mv/Makefile tests/od/Makefile tests/pr/Makefile tests/realpath/Makefile tests/readlink/Makefile tests/rm/Makefile tests/rmdir/Makefile tests/seq/Makefile tests/sha1sum/Makefile tests/shred/Makefile tests/sort/Makefile tests/stty/Makefile tests/sum/Makefile tests/tac/Makefile tests/tail-2/Makefile tests/tail/Makefile tests/tee/Makefile tests/test/Makefile tests/touch/Makefile tests/tr/Makefile tests/tsort/Makefile tests/unexpand/Makefile tests/uniq/Makefile tests/wc/Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
diff -Npruw coreutils-cvs/doc/coreutils.texi coreutils-cvs.patched/doc/coreutils.texi
--- coreutils-cvs/doc/coreutils.texi    2005-07-15 23:54:56.000000000 +0200
+++ coreutils-cvs.patched/doc/coreutils.texi 2005-07-18 18:26:43.000000000 +0200
@@ -91,6 +91,7 @@
* ptx: (coreutils)ptx invocation.               Produce permuted indexes.
* pwd: (coreutils)pwd invocation.               Print working directory.
* readlink: (coreutils)readlink invocation.     Print referent of a symlink.
+* realpath: (coreutils)realpath invocation.     Retrive absolute pathname.
* rm: (coreutils)rm invocation.                 Remove files.
* rmdir: (coreutils)rmdir invocation.           Remove empty directories.
* seq: (coreutils)seq invocation.               Print numeric sequences
@@ -183,7 +184,7 @@ Free Documentation License''.
* Printing text::                      echo printf yes
* Conditions::                         false true test expr
* Redirection::                        tee
-* File name manipulation::             dirname basename pathchk
+* File name manipulation::             dirname basename pathchk realpath
* Working context::                    pwd stty printenv tty
* User information::                   id logname whoami groups users who
* System context::                     date uname hostname
@@ -359,6 +360,7 @@ File name manipulation
* basename invocation::          Strip directory and suffix from a file name
* dirname invocation::           Strip non-directory suffix from a file name
* pathchk invocation::           Check file name portability
+* realpath invocation::          Retrieve canonicalized absolute pathname

Working context

@@ -10290,6 +10292,7 @@ This section describes commands that man
* basename invocation::         Strip directory and suffix from a file name.
* dirname invocation::          Strip non-directory suffix from a file name.
* pathchk invocation::          Check file name portability.
+* realpath invocation::         Retrieve canonicalized absolute pathname.
@end menu


@@ -10441,6 +10444,31 @@ Exit status:
@end display


address@hidden realpath invocation
address@hidden @command{realpath}: Retrieve canonicalized absolute pathname
+
address@hidden realpath
address@hidden retrieve canonicalized absolute pathname
address@hidden path, retrieve absolute path
address@hidden pathname, retrieve absolute pathname
+
address@hidden retrieves canonicalized pathname of @var{name}
+  Synopsis:
+
address@hidden
+realpath @var{name}
address@hidden example
+
+Any symbolic links, /./, /../ components and extra / characters
+are removed from @var{name} once it has been converted to an absolute
+path.
+
+The only options are @option{--help} and @option{--version}.  @xref{Common
+options}.
+
address@hidden
+
+
@node Working context
@chapter Working context

diff -Npruw coreutils-cvs/man/realpath.1 coreutils-cvs.patched/man/realpath.1
--- coreutils-cvs/man/realpath.1        1970-01-01 01:00:00.000000000 +0100
+++ coreutils-cvs.patched/man/realpath.1 2005-07-18 18:26:43.000000000 +0200
@@ -0,0 +1,43 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33.
+.TH REALPATH "1" "July 2005" "realpath 5.2.1" "User Commands"
+.SH NAME
+realpath \- return the canoncalized absolute pathname
+.SH SYNOPSIS
+.B realpath
+\fINAME
+.br
+.B realpath
+\fIOPTION\fR
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+Print canonicalized absolute pathname of NAME with any
+symbolic link, \fI/./\fR and \fI/../\fR components and
+extra \fI/\fR characters removed.
+.TP
+\fB\-\-help\fR
+display this help and exit
+.TP
+\fB\-\-version\fR
+output version information and exit
+.SH AUTHOR
+Written by Sebastian Rasmussen.
+.SH "REPORTING BUGS"
+Report bugs to <address@hidden>.
+.SH COPYRIGHT
+Copyright \(co 2005 Free Software Foundation, Inc.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.SH "SEE ALSO"
+The full documentation for
+.B realpath
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B realpath
+programs are properly installed at your site, the command
+.IP
+.B info coreutils realpath
+.PP
+should give you access to the complete manual.
diff -Npruw coreutils-cvs/man/realpath.x coreutils-cvs.patched/man/realpath.x
--- coreutils-cvs/man/realpath.x        1970-01-01 01:00:00.000000000 +0100
+++ coreutils-cvs.patched/man/realpath.x 2005-07-18 18:26:43.000000000 +0200
@@ -0,0 +1,4 @@
+[NAME]
+realpath \- return the canonicalized absolute pathname
+[DESCRIPTION]
+.\" Add any additional description here
diff -Npruw coreutils-cvs/po/POTFILES.in coreutils-cvs.patched/po/POTFILES.in
--- coreutils-cvs/po/POTFILES.in        2005-06-14 10:26:37.000000000 +0200
+++ coreutils-cvs.patched/po/POTFILES.in 2005-07-18 18:26:43.000000000 +0200
@@ -79,6 +79,7 @@ src/printf.c
src/ptx.c
src/pwd.c
src/readlink.c
+src/realpath.c
src/remove.c
src/rm.c
src/rmdir.c
diff -Npruw coreutils-cvs/src/Makefile.am coreutils-cvs.patched/src/Makefile.am
--- coreutils-cvs/src/Makefile.am       2005-07-14 02:03:08.000000000 +0200
+++ coreutils-cvs.patched/src/Makefile.am 2005-07-18 18:26:43.000000000 +0200
@@ -25,7 +25,7 @@ bin_PROGRAMS = [ chgrp chown chmod cp dd
  mkfifo mknod mv nohup readlink rm rmdir shred stat sync touch unlink \
  cat cksum comm csplit cut expand fmt fold head join md5sum \
nl od paste pr ptx sha1sum sort split sum tac tail tr tsort unexpand uniq wc \
-  basename date dirname echo env expr factor false \
+  basename realpath date dirname echo env expr factor false \
  hostname id kill logname pathchk printenv printf pwd seq sleep tee \
  test true tty whoami yes \
  $(OPTIONAL_BIN_PROGS) $(DF_PROG)
diff -Npruw coreutils-cvs/src/Makefile.in coreutils-cvs.patched/src/Makefile.in
--- coreutils-cvs/src/Makefile.in       2005-07-12 18:44:52.000000000 +0200
+++ coreutils-cvs.patched/src/Makefile.in 2005-07-18 19:02:04.000000000 +0200
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,6 +16,8 @@



+SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c realpath.c $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -53,10 +55,10 @@ bin_PROGRAMS = [$(EXEEXT) chgrp$(EXEEXT)
       paste$(EXEEXT) pr$(EXEEXT) ptx$(EXEEXT) sha1sum$(EXEEXT) \
       sort$(EXEEXT) split$(EXEEXT) sum$(EXEEXT) tac$(EXEEXT) \
       tail$(EXEEXT) tr$(EXEEXT) tsort$(EXEEXT) unexpand$(EXEEXT) \
-       uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) date$(EXEEXT) \
-       dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) expr$(EXEEXT) \
-       factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) id$(EXEEXT) \
-       kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \
+       uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) realpath$(EXEEXT) \
+       date$(EXEEXT) dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) \
+       expr$(EXEEXT) factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) \
+       id$(EXEEXT) kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \
       printenv$(EXEEXT) printf$(EXEEXT) pwd$(EXEEXT) seq$(EXEEXT) \
       sleep$(EXEEXT) tee$(EXEEXT) test$(EXEEXT) true$(EXEEXT) \
       tty$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT) $(am__EXEEXT_1) \
@@ -454,6 +456,11 @@ readlink_OBJECTS = readlink.$(OBJEXT)
readlink_LDADD = $(LDADD)
readlink_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
       ../lib/libcoreutils.a
+realpath_SOURCES = realpath.c
+realpath_OBJECTS = realpath.$(OBJEXT)
+realpath_LDADD = $(LDADD)
+realpath_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
+       ../lib/libcoreutils.a
am_rm_OBJECTS = rm.$(OBJEXT) remove.$(OBJEXT)
rm_OBJECTS = $(am_rm_OBJECTS)
rm_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@@ -482,7 +489,7 @@ shred_DEPENDENCIES = $(am__DEPENDENCIES_
sleep_SOURCES = sleep.c
sleep_OBJECTS = sleep.$(OBJEXT)
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+       $(am__DEPENDENCIES_1)
sleep_DEPENDENCIES = $(am__DEPENDENCIES_3)
sort_SOURCES = sort.c
sort_OBJECTS = sort.$(OBJEXT)
@@ -622,12 +629,12 @@ SOURCES = $(__SOURCES) basename.c cat.c
       id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
       $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
       nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
-       printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
-       rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
-       sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
-       tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
-       unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
-       wc.c who.c whoami.c yes.c
+       printenv.c printf.c ptx.c pwd.c readlink.c realpath.c \
+       $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) \
+       shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c \
+       tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c \
+       uname.c unexpand.c uniq.c unlink.c uptime.c users.c \
+       $(vdir_SOURCES) wc.c who.c whoami.c yes.c
DIST_SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c \
       $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \
       csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \
@@ -636,12 +643,12 @@ DIST_SOURCES = $(__SOURCES) basename.c c
       id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
       $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
       nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
-       printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
-       rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
-       sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
-       tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
-       unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
-       wc.c who.c whoami.c yes.c
+       printenv.c printf.c ptx.c pwd.c readlink.c realpath.c \
+       $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) \
+       shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c \
+       tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c \
+       uname.c unexpand.c uniq.c unlink.c uptime.c users.c \
+       $(vdir_SOURCES) wc.c who.c whoami.c yes.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
@@ -677,7 +684,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EOVERFLOW = @EOVERFLOW@
EXEEXT = @EXEEXT@
-FESETROUND_LIBM = @FESETROUND_LIBM@
FNMATCH_H = @FNMATCH_H@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
@@ -824,11 +830,9 @@ printf_LDADD = $(LDADD) $(POW_LIB) $(LIB
# If necessary, add -lm to resolve use of floor, rint, modf.
seq_LDADD = $(LDADD) $(SEQ_LIBM)

-# If necessary, add -lm to resolve the `pow' reference in lib/strtod.c
-# or for the fesetround reference in programs using nanosec.c.
-nanosec_libs = \
-  $(LDADD) $(FESETROUND_LIBM) $(POW_LIB) $(LIB_NANOSLEEP)
-
+# If necessary, add libraries to resolve the `pow' reference in lib/strtod.c
+# and the `nanosleep' reference in lib/xnanosleep.c.
+nanosec_libs = $(LDADD) $(POW_LIB) $(LIB_NANOSLEEP)
sleep_LDADD = $(nanosec_libs)
tail_LDADD = $(nanosec_libs)
uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
@@ -1138,6 +1142,9 @@ pwd$(EXEEXT): $(pwd_OBJECTS) $(pwd_DEPEN
readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES)
       @rm -f readlink$(EXEEXT)
$(LINK) $(readlink_LDFLAGS) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS)
+realpath$(EXEEXT): $(realpath_OBJECTS) $(realpath_DEPENDENCIES)
+       @rm -f realpath$(EXEEXT)
+ $(LINK) $(realpath_LDFLAGS) $(realpath_OBJECTS) $(realpath_LDADD) $(LIBS)
rm$(EXEEXT): $(rm_OBJECTS) $(rm_DEPENDENCIES)
       @rm -f rm$(EXEEXT)
       $(LINK) $(rm_LDFLAGS) $(rm_OBJECTS) $(rm_LDADD) $(LIBS)
@@ -1343,6 +1350,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
@AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
diff -Npruw coreutils-cvs/tests/Makefile.am coreutils-cvs.patched/tests/Makefile.am
--- coreutils-cvs/tests/Makefile.am     2005-06-22 20:07:55.000000000 +0200
+++ coreutils-cvs.patched/tests/Makefile.am 2005-07-18 18:31:55.000000000 +0200
@@ -21,8 +21,8 @@ EXTRA_DIST = \
SUBDIRS = \
  basename chgrp chmod chown cp cut date dd dircolors du expr factor \
  fmt head install join ln ls ls-2 md5sum misc mkdir mv od pr readlink \
-  rm rmdir seq sha1sum shred sort stty sum tac tail tail-2 tee test \
-  touch tr tsort unexpand uniq wc
+  realpath rm rmdir seq sha1sum shred sort stty sum tac tail tail-2 tee \
+  test touch tr tsort unexpand uniq wc

.PHONY: check-root
check-root:
diff -Npruw coreutils-cvs/tests/Makefile.in coreutils-cvs.patched/tests/Makefile.in
--- coreutils-cvs/tests/Makefile.in     2005-07-12 18:44:56.000000000 +0200
+++ coreutils-cvs.patched/tests/Makefile.in 2005-07-18 19:02:08.000000000 +0200
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -194,7 +194,6 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EOVERFLOW = @EOVERFLOW@
EXEEXT = @EXEEXT@
-FESETROUND_LIBM = @FESETROUND_LIBM@
FNMATCH_H = @FNMATCH_H@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
@@ -312,8 +311,8 @@ EXTRA_DIST = \
SUBDIRS = \
  basename chgrp chmod chown cp cut date dd dircolors du expr factor \
  fmt head install join ln ls ls-2 md5sum misc mkdir mv od pr readlink \
-  rm rmdir seq sha1sum shred sort stty sum tac tail tail-2 tee test \
-  touch tr tsort unexpand uniq wc
+  realpath rm rmdir seq sha1sum shred sort stty sum tac tail tail-2 tee \
+  test touch tr tsort unexpand uniq wc

all: all-recursive

diff -Npruw coreutils-cvs/tests/help-version coreutils-cvs.patched/tests/help-version
--- coreutils-cvs/tests/help-version    2005-01-05 23:08:48.000000000 +0100
+++ coreutils-cvs.patched/tests/help-version 2005-07-18 18:26:43.000000000 +0200
@@ -122,6 +122,7 @@ shred_args=$tmp_in
touch_args=$tmp_in2

basename_args=$tmp_in
+realpath_args=$tmp_in
dirname_args=$tmp_in
expr_args=foo

diff -Npruw coreutils-cvs/tests/realpath/Makefile.am coreutils-cvs.patched/tests/realpath/Makefile.am --- coreutils-cvs/tests/realpath/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-cvs.patched/tests/realpath/Makefile.am 2005-07-18 20:32:35.000000000 +0200
@@ -0,0 +1,11 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+AUTOMAKE_OPTIONS = 1.4 gnits
+
+TESTS = basic
+EXTRA_DIST = $(TESTS)
+TESTS_ENVIRONMENT = \
+  top_srcdir=$(top_srcdir) \
+  srcdir=$(srcdir) \
+  PERL="$(PERL)" \
+  PATH="`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \
+  PROG=realpath
diff -Npruw coreutils-cvs/tests/realpath/Makefile.in coreutils-cvs.patched/tests/realpath/Makefile.in --- coreutils-cvs/tests/realpath/Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ coreutils-cvs.patched/tests/realpath/Makefile.in 2005-07-18 20:32:43.000000000 +0200
@@ -0,0 +1,521 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/realpath
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
+       $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/backupfile.m4 \
+       $(top_srcdir)/m4/basename.m4 $(top_srcdir)/m4/bison.m4 \
+       $(top_srcdir)/m4/boottime.m4 $(top_srcdir)/m4/c-strtod.m4 \
+       $(top_srcdir)/m4/calloc.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/check-decl.m4 \
+       $(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/closeout.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/cycle-check.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/diacrit.m4 $(top_srcdir)/m4/dirfd.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/euidaccess.m4 $(top_srcdir)/m4/exclude.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fd-reopen.m4 \
+       $(top_srcdir)/m4/file-type.m4 $(top_srcdir)/m4/fileblocks.m4 \
+       $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \
+       $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/fstypename.m4 \
+       $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getcwd-path-max.m4 \
+       $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdate.m4 \
+       $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
+       $(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 \
+       $(top_srcdir)/m4/getugroups.m4 \
+       $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/group-member.m4 \
+       $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hash-pjw.m4 \
+       $(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/host-os.m4 \
+       $(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/intmax_t.m4 \
+       $(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/jm-macros.m4 $(top_srcdir)/m4/jm-winsz1.m4 \
+       $(top_srcdir)/m4/jm-winsz2.m4 $(top_srcdir)/m4/lchown.m4 \
+       $(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/linebuffer.m4 $(top_srcdir)/m4/link-follow.m4 \
+       $(top_srcdir)/m4/localcharset.m4 \
+       $(top_srcdir)/m4/long-options.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+       $(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
+       $(top_srcdir)/m4/memcmp.m4 $(top_srcdir)/m4/memcoll.m4 \
+       $(top_srcdir)/m4/memcpy.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/memset.m4 $(top_srcdir)/m4/mkdir-p.m4 \
+       $(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \
+       $(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/obstack.m4 \
+       $(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/openat.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \
+       $(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/posixtm.m4 $(top_srcdir)/m4/posixver.m4 \
+       $(top_srcdir)/m4/prereq.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
+       $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
+       $(top_srcdir)/m4/readtokens.m4 $(top_srcdir)/m4/readutmp.m4 \
+       $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
+       $(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/rmdir-errno.m4 \
+       $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/root-dev-ino.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/safe-read.m4 \
+       $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/same.m4 \
+       $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/settime.m4 \
+       $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sig2str.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/ssize_t.m4 \
+       $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/st_mtim.m4 \
+       $(top_srcdir)/m4/stat-macros.m4 $(top_srcdir)/m4/stat-prog.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
+       $(top_srcdir)/m4/stdio-safer.m4 \
+       $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdopen.m4 \
+       $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strcspn.m4 $(top_srcdir)/m4/strdup.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/stripslash.m4 \
+       $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strnumcmp.m4 $(top_srcdir)/m4/strpbrk.m4 \
+       $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
+       $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \
+       $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/timespec.m4 \
+       $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/tzset.m4 \
+       $(top_srcdir)/m4/uint32_t.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/uintptr_t.m4 $(top_srcdir)/m4/ullong_max.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unicodeio.m4 \
+       $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+       $(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
+       $(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
+       $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
+       $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
+       $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
+       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xfts.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xnanosleep.m4 \
+       $(top_srcdir)/m4/xreadlink.m4 $(top_srcdir)/m4/xstrtod.m4 \
+       $(top_srcdir)/m4/xstrtoimax.m4 $(top_srcdir)/m4/xstrtol.m4 \
+       $(top_srcdir)/m4/xstrtoumax.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DF_PROG = @DF_PROG@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
+GETOPT_H = @GETOPT_H@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GNU_PACKAGE = @GNU_PACKAGE@
+HAVE__BOOL = @HAVE__BOOL@
+HELP2MAN = @HELP2MAN@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KMEM_GROUP = @KMEM_GROUP@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_CRYPT = @LIB_CRYPT@
+LIB_EACCESS = @LIB_EACCESS@
+LIB_FDATASYNC = @LIB_FDATASYNC@
+LIB_GETHRXTIME = @LIB_GETHRXTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAN = @MAN@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NEED_SETGID = @NEED_SETGID@
+OBJEXT = @OBJEXT@
+OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+RANLIB = @RANLIB@
+SEQ_LIBM = @SEQ_LIBM@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STRIP = @STRIP@
+U = @U@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AUTOMAKE_OPTIONS = 1.4 gnits
+TESTS = basic
+EXTRA_DIST = $(TESTS)
+TESTS_ENVIRONMENT = \
+  top_srcdir=$(top_srcdir) \
+  srcdir=$(srcdir) \
+  PERL="$(PERL)" \
+  PATH="`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \
+  PROG=realpath
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/realpath/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnits  tests/realpath/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list='$(TESTS)'; \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *" $$tst "*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               echo "XPASS: $$tst"; \
+             ;; \
+             *) \
+               echo "PASS: $$tst"; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *" $$tst "*) \
+               xfail=`expr $$xfail + 1`; \
+               echo "XFAIL: $$tst"; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               echo "FAIL: $$tst"; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             echo "SKIP: $$tst"; \
+           fi; \
+         done; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="All $$all tests passed"; \
+           else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all tests failed"; \
+           else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         echo "$$dashes"; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-TESTS check-am clean clean-generic \
+       distclean distclean-generic distdir dvi dvi-am html html-am \
+       info info-am install install-am install-data install-data-am \
+       install-exec install-exec-am install-info install-info-am \
+       install-man install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+       uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:






reply via email to

[Prev in Thread] Current Thread [Next in Thread]