From 057b8b7101e864ee33ca9f510ca4815a8620855e Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 15 Apr 2007 14:46:39 +0000 Subject: [PATCH] Fixes to ensure that 'make distcheck' works --- Makefile.am | 2 +- build-aux/Makefile.am | 1 + configure.in | 2 +- doc/Makefile.am | 2 +- find/testsuite/find.gnu/execdir-in-unreadable.exp | 9 ++++ import-gnulib.config | 4 +- import-gnulib.sh | 28 ++++++++++++- lib/Makefile.am | 6 +-- lib/gnulib-version.sh | 50 ----------------------- locate/Makefile.am | 2 +- 10 files changed, 45 insertions(+), 61 deletions(-) create mode 100644 build-aux/Makefile.am create mode 100644 find/testsuite/find.gnu/execdir-in-unreadable.exp delete mode 100644 lib/gnulib-version.sh diff --git a/Makefile.am b/Makefile.am index 556a7a6..3ed8700 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS=gnits EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \ THANKS import-gnulib.sh import-gnulib.config # "tests" is the gnulib unit test dir. -SUBDIRS = gnulib tests lib find xargs locate doc po m4 +SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am new file mode 100644 index 0000000..5463fff --- /dev/null +++ b/build-aux/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = check-testfiles.sh diff --git a/configure.in b/configure.in index fdeaf35..5bd423f 100644 --- a/configure.in +++ b/configure.in @@ -230,7 +230,7 @@ AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils]) AC_CONFIG_FILES(gnulib/Makefile gnulib/lib/Makefile) AC_CONFIG_FILES(m4/Makefile) AC_CONFIG_FILES([Makefile - tests/Makefile + tests/Makefile build-aux/Makefile find/Makefile find/testsuite/Makefile xargs/Makefile xargs/testsuite/Makefile locate/Makefile locate/testsuite/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am index 1621418..4693bea 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ info_TEXINFOS = find.texi -find_TEXINFOS = perm.texi regexprops.texi +find_TEXINFOS = perm.texi getdate.texi regexprops.texi MOSTLYCLEANFILES = find.cps CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz regexprops.texi diff --git a/find/testsuite/find.gnu/execdir-in-unreadable.exp b/find/testsuite/find.gnu/execdir-in-unreadable.exp new file mode 100644 index 0000000..b77c753 --- /dev/null +++ b/find/testsuite/find.gnu/execdir-in-unreadable.exp @@ -0,0 +1,9 @@ +# tests for -execdir ... \+ in a directory which is not readable +exec rm -rf tmp +exec mkdir tmp +exec chmod 755 tmp +exec mkdir tmp/sub +exec chmod 300 tmp/sub +find_start p { tmp -maxdepth 1 -execdir true \{\} \+ } +exec chmod 700 tmp/sub +exec rm -rf tmp diff --git a/import-gnulib.config b/import-gnulib.config index e2c31cb..b7664a4 100644 --- a/import-gnulib.config +++ b/import-gnulib.config @@ -1,16 +1,16 @@ # What version of gnulib to use? -gnulib_version="2007-04-03" +gnulib_version="2007-04-14" destdir="gnulib" # Random extra gnulib files needed for findutils. extra_files=' build-aux/config.guess -build-aux/config.rpath build-aux/config.sub build-aux/depcomp build-aux/install-sh build-aux/mdate-sh +build-aux/mkinstalldirs build-aux/missing build-aux/texinfo.tex ' diff --git a/import-gnulib.sh b/import-gnulib.sh index 5ffbcea..5dc4fd0 100644 --- a/import-gnulib.sh +++ b/import-gnulib.sh @@ -183,6 +183,30 @@ refresh_output_files() { } +update_version_file() { + local ver + outfile="lib/gnulib-version.c" + if [ -z "$gnulib_version" ] ; then + ver="unknown (locally modified code; no version number available)" + else + ver="$gnulib_version" + fi + + + cat > "${outfile}".new < /dev/null ; then + rm "${outfile}".new + return 0 + fi + fi + mv "${outfile}".new "${outfile}" +} + + main() { ## Option parsing local gnulibdir=/doesnotexist @@ -211,7 +235,9 @@ main() { run_gnulib_tool "${tool}" && hack_gnulib_tool_output "${gnulibdir}" && - refresh_output_files && echo Done. + refresh_output_files && + update_version_file && + echo Done. } main "$@" diff --git a/lib/Makefile.am b/lib/Makefile.am index b3284c6..e900bf3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -15,14 +15,14 @@ endif libfind_a_SOURCES = gnulib-version.c EXTRA_DIST = modetype.h wait.h extendbuf.h savedirinfo.h buildcmd.h \ - gnulib-version.h gnulib-version.sh gnulib-version.c + gnulib-version.h gnulib-version.c BUILT_SOURCES = gnulib-version.c SUFFIXES = MOSTLYCLEANFILES = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = -IMPORT_GNULIB_CONFIG = $(top_srcdir)/import-gnulib.config + INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib LDADD = ../gnulib/lib/libgnulib.a @INTLLIBS@ @@ -42,5 +42,3 @@ libfind_a_DEPENDENCIES = @FINDLIBOBJS@ # libfind_a_OBJECTS += @FINDLIBOBJS@ # libfind_la_OBJECTS += @LTFINDLIBOBJS@ -$(srcdir)/gnulib-version.c: $(srcdir)/gnulib-version.sh $(IMPORT_GNULIB_CONFIG) - sh $(srcdir)/gnulib-version.sh $(top_srcdir) $(srcdir) $(IMPORT_GNULIB_CONFIG) \ No newline at end of file diff --git a/lib/gnulib-version.sh b/lib/gnulib-version.sh deleted file mode 100644 index b9494b9..0000000 --- a/lib/gnulib-version.sh +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# -# gnulib-version.sh -- creates gnulib-version.c (from ../import-gnulib.config) -# Copyright (C) 2007 Free Software Foundation, Inc. -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -# USA. -# - -topsrcdir="$1" -srcdir="$2" -configfile="$3" - -outfile="${srcdir}"/gnulib-version.c - -source $configfile - -if [ -z "$gnulib_version" ] -then - echo "Error: There should be a gnulib_version setting in $configfile, but there is not." >&2 - exit 1 -fi - - -cat > "${outfile}".new < /dev/null - then - # nothing to do - rm "${outfile}".new - exit 0 - fi -fi -mv "${outfile}".new "${outfile}" diff --git a/locate/Makefile.am b/locate/Makefile.am index aafae73..d27c8d4 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -39,6 +39,6 @@ updatedb: updatedb.sh chmod +x $@ install-data-hook: - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(localstatedir) + $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir) SUBDIRS = testsuite -- 2.11.4.GIT