bugfindutils - Bugs: bug #12064, make distclean deletes a...

 
 

bug #12064: make distclean deletes a distributed file

Submitter:  None
Submitted:  Mon 21 Feb 2005 04:30:27 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Compilation Failure Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Martin Buchholz Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.18
Fixed Release:  4.2.19
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Feb 2005 10:50:00 PM UTC, comment #5: 

Fixed by removing CONFIG_CLEAN_FILES.

James Youngman <jay>
Group administrator
Sun 27 Feb 2005 11:02:09 PM UTC, comment #4: 

I did some follow-up work on this.

The problem is that bash prints the current directory
after a `cd' if CDPATH is defined.

So this code in import-gnulib.sh:

printf "%s" "EXTRA_DIST = "
cd  gnulib/m4
ls *.m4 | sed -e 's/$/ \\/' | sed -e '$ s/\\$//'

had undesired extra output from the cd command.

(martin@wobble) ~/src/findutils/findutils $ diff -u import-gnulib.sh~ import-gnulib.sh
--- import-gnulib.sh~ 2005-01-24 01:37:19.000000000 -0800
+++ import-gnulib.sh 2005-02-27 14:49:28.000000000 -0800
@@ -32,6 +32,7 @@
 
 destdir="gnulib"
 
+unset CDPATH
 
 # Modules needed for findutils itself.
 findutils_modules="\

Note that automake, for example, is also careful to
unset CDPATH.

./share/autoconf/m4sugar/m4sh.m4:220:# CDPATH.
./share/autoconf/m4sugar/m4sh.m4:221:$as_unset CDPATH

If you don't have enough to worry about, you might
also want to worry about IFS...

Martin

Anonymous
Wed 23 Feb 2005 09:17:56 AM UTC, comment #3: 

This is very odd.  I don't get the same effect in gnulib/m4/Makefile.in.  I've tested this with automake-1.7, automake-1.8 and automake-1.9 (all with autoconf-2.59).  In each case the Makefile.in file is correct and ends like this:

.PHONY: all all-am check 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:

The Makefile.am file is actually generated by findutils' "import-gnulib.sh".  However, on my system here I don't get the spurious "alloca.m4" that you get.   If I comment out the part of import-gnulib.sh and use the (identical) file produced by gnulib-tool (as invoked by import-gnulib.sh) I also get the same result. 

SO, I can't reproduce this problem with the invalue Makefile/Makefile.in.   If I could and it was gnulib's fault, I would indeed report a bug.  As things are, I can't figure out why you are seeing what you are seeing. 

The only hypothesis that I can come up with just now - and it's pretty thin - is that the printf command at line 129 of import-gnulib.sh is not producing any output on your system, hence you're not getting the "EXTRA_DIST = " part before "alloca.m4" in Makefile.am.   This seems unlikely even to me.

Could you try to figure out why you get that alloca.m4 line in there?  

Meanwhile, see also my recent post to bug-gnulib (however, the archive at http://lists.gnu.org/archive/html/bug-gnulib/2005-02/threads.html has not been updated to include it yet)

James Youngman <jay>
Group administrator
Wed 23 Feb 2005 04:07:10 AM UTC, comment #2: 

(From Martin Buchholz)

I cvs'ed the distribution and
followed the instructions in README-CVS (for the first time).

Unfortunately, I couldn't perform my test, because
configure; make distclean
failed as follows

make[1]: Entering directory `/home/martin/src/findutils/findutils/gnulib'
Making distclean in m4
/home/martin/src/findutils/findutils/gnulib/m4
make[2]: Entering directory `/home/martin/src/findutils/findutils/gnulib/m4'
Makefile:289: * missing separator.  Stop.
make[2]: Leaving directory `/home/martin/src/findutils/findutils/gnulib/m4'
make[1]: * [distclean-recursive] Error 1
make[1]: Leaving directory `/home/martin/src/findutils/findutils/gnulib'


Looking at gnulib/m4/Makefile.in, I see:

.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-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

alloca.m4 \
...

The obvious thing to do was to add two missing backslashes.

Then
configure; make distclean
gives the desired result (regex.c not deleted).
And I confirmed that no other file was deleted,
and that all the generated files are also part of
the distribution tarball.

So findutils is now distclean-clean, at least on Linux.

Could you file a (serious) bug against gnulib?


Anonymous
Wed 23 Feb 2005 12:56:30 AM UTC, comment #1: 

The regex.c file is a persistent problem.  See

http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html
http://lists.gnu.org/archive/html/bug-gnulib/2004-12/msg00122.html
http://lists.gnu.org/archive/html/bug-gnulib/2005-01/msg00070.html
http://lists.gnu.org/archive/html/bug-gnulib/2005-01/msg00071.html

In summary, I have tried several ways of solving this problem, including the current strategy which is this:

##
## regex.c seems to get left out if I use automake-1.9 but not
## if I use automake-1.7.   Hence dist-hook has to be able to
## copy regex.c into the relevant (read-only) directory if it
## is not already there, but needs to avoid doing so if the
## file is already in place.   Ugh.
##                             -- James Youngman <jay@gnu.org>
##
dist-hook: jy-regex-fix findutils-check-pofiles findutils-check-testfiles

jy-regex-fix:
        if test -f $(distdir)/gnulib/lib/regex.c ; then \
                echo regex.c is already in place.  Great. ; \
        else \
                echo Making $(distdir)/gnulib/lib writable ... ; \
                chmod +w $(distdir)/gnulib/lib ; \
                echo Copying $(srcdir)/gnulib/lib/regex.c to $(distdir)/gnulib/lib ; \
                cp $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib/regex.c ;
\
        fi
#       ls -ld $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib

I have modified the toplevel Makefile.am to remove regex.c from CONFIG_CLEAN_FILES (see attached patch).  Please test this fix to make sure you're happy with it, either by applying the patch or by testing the CVS code, and let me know how you get on.

Goodnight,
James.

James Youngman <jay>
Group administrator
Mon 21 Feb 2005 04:30:27 AM UTC, original submission:  

make distclean removes gnulib/lib/regex.c, but that
file is needed by a subsequent configure; make

make -n distclean
....
test -z "gnulib/lib/regex.c" || rm -f gnulib/lib/regex.c

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2608:  findutils-4.2.18.regex-clean.patch added by jay (463B - text/x-patch - Proposed fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-03-07 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.19
2005-02-28 jay StatusNeed Info Fixed
2005-02-23 jay StatusNone Need Info
    Assigned toNone jay
    Attached File- Added findutils-4.2.18.regex-clean.patch, #2230
2005-02-21 None Carbon-Copy- Added martin --DOT-- buchholz --AT-- sun --DOT-- com

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code