summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2015-12-27 20:11:27 +0000
committerJames Youngman <jay@gnu.org>2015-12-27 21:07:56 +0000
commitfc260795fd51b08c1f1edc25499ffc283b10a743 (patch)
tree70e2617a5d35c4abd4ea5580ecde3a2272cfd75c
parent2b39a561dffdfeadafe81dde734a153159bb0996 (diff)
downloadfindutils-fc260795fd51b08c1f1edc25499ffc283b10a743.tar.gz
Remove support for installing oldfind.
This fulfills a reqeust made as Savannah bug #46714. * NEWS: Mention this change. * m4/withfts.m4 (FIND_WITH_FTS): --with-fts is the only supported choice. The configure script now fails if run using --without-fts or --with-fts=no. * find/Makefile.am (noinst_PROGRAMS): Never install oldfind. Delete the oldfind.1 and ftsfind.1 manpages, leaving only find.1. Fix a typo and remove some commented-out lines. * find/find.c (main): add a comment pointing out that this is not the main() function of th binary that actually gets installed. * find/ftsfind.1: delete. * find/oldfind.1: delete. * find/find.1: Remove the section "BINARIES" since there are no longer two binaries. * find/testsuite/config/unix.exp: Assume --with-fts; hence the binaries are always called oldfind and find (and there is no ftsfind binary).
-rw-r--r--NEWS8
-rw-r--r--find/Makefile.am34
-rw-r--r--find/find.121
-rw-r--r--find/find.c3
-rw-r--r--find/ftsfind.131
-rw-r--r--find/oldfind.131
-rw-r--r--find/testsuite/config/unix.exp11
-rw-r--r--m4/withfts.m49
8 files changed, 26 insertions, 122 deletions
diff --git a/NEWS b/NEWS
index fc1eb929..07d4e70c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,14 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
* Major changes in release 4.5.18-git, 2015-12-DD
+** Changes to find
+
+Only the ftsfind binary will be installed, as "find". Installing
+oldfind, under any name, is no longer supported. The configure option
+--with-fts is still allowed, but trying to use it to enable the
+installation of oldfind (for example by using --with-fts=no) results
+in configure stopping with an error message.
+
** Translations
Updated the Slovenian translation.
diff --git a/find/Makefile.am b/find/Makefile.am
index 30eba1df..67cfdfe6 100644
--- a/find/Makefile.am
+++ b/find/Makefile.am
@@ -1,47 +1,31 @@
AUTOMAKE_OPTIONS = std-options
AM_CFLAGS = $(WARN_CFLAGS)
localedir = $(datadir)/locale
-# noinst_PROGRAMS = regexprops
-# regexprops_SOURCES = regexprops.c
noinst_LIBRARIES = libfindtools.a
libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c
-# We always build two versions of find, one with fts, one without.
-# Their names depend on whether the user specified --with-fts.
-#
-# --with-fts find extra binary
-# yes with fts 'oldfind', without fts
-# no without fts 'ftsfind', with fts
-#
-if WITH_FTS
-bin_PROGRAMS = find oldfind
+# We always build two versions of find, one with fts (called "find"),
+# one without (called "oldfind"). The oldfind binary is no longer
+# installed.
+bin_PROGRAMS = find
+noinst_PROGRAMS = oldfind
find_SOURCES = ftsfind.c
oldfind_SOURCES = find.c
-man_MANS = find.1 oldfind.1
-else
-bin_PROGRAMS = find ftsfind
-find_SOURCES = find.c
-ftsfind_SOURCES = ftsfind.c
-man_MANS = find.1 ftsfind.1
-endif
-
-# We don't just include man_MANS in EXTRA_DIST because while the value of
-# man_MANS is not always the same, we want to distribute all of those files.
-EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1
+man_MANS = find.1
+
+EXTRA_DIST = defs.h sharefile.h print.h $(man_MANS)
AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS)
# gnulib advises we link against <first> because we use <second>:
# $(GETHOSTNAME_LIB) uname
-# $(LIB_CLOCK_GETTIME) (some inditrect dependency)
+# $(LIB_CLOCK_GETTIME) (some indirect dependency)
# $(LIB_EACCESS) faccessat
# $(LIB_SELINUX) selinux-h
# $(MODF_LIBM) modf
SUBDIRS = . testsuite
-#$(PROGRAMS): ../lib/libfind.a
-
dist-hook: findutils-check-manpages
# Clean coverage files generated by running binaries built with
diff --git a/find/find.1 b/find/find.1
index 2863f801..9ffeac59 100644
--- a/find/find.1
+++ b/find/find.1
@@ -1856,27 +1856,6 @@ directives of
.B \-printf
and
.BR \-fprintf .
-.SH BINARIES
-The findutils source distribution contains two different
-implementations of
-.BR find .
-The older implementation descends the file system recursively, while
-the newer one uses
-.BR fts (3).
-Both are normally installed.
-.P
-If the option
-.B \-\-without\-fts
-was passed to
-.BR configure ,
-the recursive implementation is installed as
-.B find
-and the fts-based implementation is installed as
-.BR ftsfind .
-Otherwise, the fts-based implementation is installed as
-.B find
-and the recursive implementation is installed as
-.BR oldfind .
.SH "EXAMPLES"
.nf
.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f
diff --git a/find/find.c b/find/find.c
index a5530ba8..c32cbc59 100644
--- a/find/find.c
+++ b/find/find.c
@@ -173,7 +173,8 @@ get_current_dirfd (void)
return AT_FDCWD;
}
-
+/* CAUTION: this is the entry point for the oldfind executable, which is not the binary that
+ * will actually get installed. See ftsfind.c. */
int
main (int argc, char **argv)
{
diff --git a/find/ftsfind.1 b/find/ftsfind.1
deleted file mode 100644
index 08a2c54b..00000000
--- a/find/ftsfind.1
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH FTSFIND 1 \" -*- nroff -*-
-.SH NAME
-ftsfind \- search for files in a directory hierarchy
-.SH SYNOPSIS
-.B ftsfind
-[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression]
-.SH DESCRIPTION
-The
-.B ftsfind
-and
-.B find
-programs are functionally identical. The only difference between them
-is the implementation internals of how the filesystem is searched.
-The
-.B find
-binary has a recursive implementation while
-.B ftsfind
-uses
-.BR fts (3).
-The fts-based implementation will replace the recursive implementation
-but for the moment both implementations are installed.
-.P
-The implementation which is installed as
-.B find
-on this system is the recursive implementation, since the
-.B \-\-without\-fts
-option was passed to the
-.B configure
-script when findutils was built.
-.SH "SEE ALSO"
-\fBfind\fP(1), \fBfts\fP(3), \fBFinding Files\fP (on-line in Info, or printed).
diff --git a/find/oldfind.1 b/find/oldfind.1
deleted file mode 100644
index 2c319212..00000000
--- a/find/oldfind.1
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH OLDFIND 1 \" -*- nroff -*-
-.SH NAME
-oldfind \- search for files in a directory hierarchy
-.SH SYNOPSIS
-.B oldfind
-[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression]
-.SH DESCRIPTION
-The
-.B oldfind
-and
-.B find
-programs are functionally identical. The only difference between them
-is the implementation internals of how the filesystem is searched.
-The
-.B oldfind
-binary has a recursive implementation while
-.B find
-uses
-.BR fts (3).
-The fts-based implementation will replace the recursive implementation
-but for the moment both implementations are installed.
-.P
-The implementation which is installed as
-.B find
-on this system is the fts-based implementation, since the
-.B \-\-without\-fts
-option was not passed to the
-.B configure
-script when findutils was built.
-.SH "SEE ALSO"
-\fBfind\fP(1), \fBfts\fP(3), \fBFinding Files\fP (on-line in Info, or printed).
diff --git a/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp
index a1f55c64..d69363ae 100644
--- a/find/testsuite/config/unix.exp
+++ b/find/testsuite/config/unix.exp
@@ -37,15 +37,8 @@ if { ![info exists OLDFIND] || ![info exists FTSFIND] } {
if ![file exists "$dir/$objfile"] then {
error "dir is $dir, but I cannot see $objfile in that directory"
}
- if ([findfile $dir/oldfind 1 0]) {
- verbose "found oldfind, so ftsfind must be called find"
- set OLDFIND [findfile $dir/oldfind $dir/oldfind [transform oldfind]]
- set FTSFIND [findfile $dir/find $dir/find [transform find ]]
- } else {
- verbose "did not find oldfind, so ftsfind must be called ftsfind"
- set OLDFIND [findfile $dir/find $dir/find [transform find ]]
- set FTSFIND [findfile $dir/ftsfind $dir/ftsfind [transform ftsfind]]
- }
+ set OLDFIND [findfile $dir/oldfind $dir/oldfind [transform oldfind]]
+ set FTSFIND [findfile $dir/find $dir/find [transform find ]]
}
verbose "ftsfind is at $FTSFIND" 2
diff --git a/m4/withfts.m4 b/m4/withfts.m4
index 173ccf17..8fb91e32 100644
--- a/m4/withfts.m4
+++ b/m4/withfts.m4
@@ -1,13 +1,14 @@
+dnl This macro is being phased out; --with-fts is now mandatory. The
+dnl oldfind binary is no longer installed.
AC_DEFUN([FIND_WITH_FTS],
[AC_ARG_WITH([fts],
[ --without-fts Use an older mechanism for searching the filesystem, instead of using fts()],[with_fts=$withval],[])
case $with_fts in
- yes|no) ;;
+ yes) ;;
'') with_fts=yes ;;
+ no) AC_MSG_ERROR([Using --without-fts is not longer supported]) ;;
*) AC_MSG_ERROR([Invalid value for --with-fts: $with_fts])
esac
AM_CONDITIONAL(WITH_FTS, [[test x"${with_fts-no}" != xno]])
- if test x"${with_fts-no}" != xno ; then
- AC_DEFINE([WITH_FTS], 1, [Define if you want to use fts() to do the filesystem search.])
- fi
+ AC_DEFINE([WITH_FTS], 1, [Define if you want to use fts() to do the filesystem search.])
])