GNU bug report logs - #17354
distclean fails when source is relatively otherplace

Previous Next

Package: automake;

Reported by: Jan Engelhardt <jengelh <at> inai.de>

Date: Sat, 26 Apr 2014 23:50:03 UTC

Severity: normal

Tags: wontfix

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17354 in the body.
You can then email your comments to 17354 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#17354; Package automake. (Sat, 26 Apr 2014 23:50:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Engelhardt <jengelh <at> inai.de>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Sat, 26 Apr 2014 23:50:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Engelhardt <jengelh <at> inai.de>
To: automake-bug <at> gnu.org
Subject: distclean fails when source is relatively otherplace
Date: Sun, 27 Apr 2014 01:48:56 +0200 (CEST)
With automake-1.13.4 & automake-1.14, when there is a _SOURCES = 
../blah.c, make does not properly run because .deps is gone too early.


File set:

# Makefile.am
SUBDIRS = b
noinst_PROGRAMS = foo

# configure.ac
AC_INIT([a],[0])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PROG_CC
AC_CONFIG_FILES([Makefile b/Makefile])
AC_OUTPUT

# foo.c
int main(void){return 0;}

# b/Makefile.am
noinst_PROGRAMS = bar
bar_SOURCES = ../foo.c


Observed:

01:43 wrgstfl:/dev/shm/testcase > make distclean
Making distclean in b
make[1]: Entering directory `/dev/shm/testcase/b'
test -z "bar" || rm -f bar
rm -f *.o
rm -f ../*.o
rm -f *.tab.c
test -z "" || rm -f 
test . = "." || test -z "" || rm -f 
rm -f ../.deps/.dirstamp
rm -f ../.dirstamp
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -rf ../.deps
rm -f Makefile
make[1]: Leaving directory `/dev/shm/testcase/b'
make[1]: Entering directory `/dev/shm/testcase'
Makefile:348: .deps/foo.Po: No such file or directory
make[1]: *** No rule to make target `.deps/foo.Po'.  Stop.
make[1]: Leaving directory `/dev/shm/testcase'
make: *** [distclean-recursive] Error 1


Expected:

Don't fail.


Additional information:

The problem is also observable without using "..";
foo_SOURCES = b/foo.c, bar_SOURCES = foo.c
also yields the same issue that one .deps is gone before the Makefile of 
another directory is executed.




Information forwarded to bug-automake <at> gnu.org:
bug#17354; Package automake. (Wed, 15 Oct 2014 17:07:02 GMT) Full text and rfc822 format available.

Message #8 received at 17354 <at> debbugs.gnu.org (full text, mbox):

From: Colomban Wendling <lists.ban <at> herbesfolles.org>
To: 17354 <at> debbugs.gnu.org
Subject: Re: bug#17354: distclean fails when source is relatively otherplace
Date: Wed, 15 Oct 2014 19:06:13 +0200
I just ran into this issue today trying to port a relatively large build
system to use `subdir-objects`.

This is quite annoying as everything else works just fine, but this bug
either prevents me from using `subdir-objects` at all or forces me to
rewrite these parts using a completely different approach.

Also, I would believe it should be relatively easy to fix as distclean
basically just *removes* files anyway.  And the fact the problem here is
that a file is already gone sounds a bit ironic :)




Information forwarded to bug-automake <at> gnu.org:
bug#17354; Package automake. (Fri, 19 Dec 2014 12:27:01 GMT) Full text and rfc822 format available.

Message #11 received at 17354 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Jan Engelhardt <jengelh <at> inai.de>, 17354 <at> debbugs.gnu.org
Cc: GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Subject: Re: bug#17354: distclean fails when source is relatively otherplace
Date: Fri, 19 Dec 2014 13:26:10 +0100
tags 17354 wontfix
close 17354
stop

On 04/27/2014 01:48 AM, Jan Engelhardt wrote:
>
> With automake-1.13.4 & automake-1.14, when there is a _SOURCES =
> ../blah.c, make does not properly run because .deps is gone too early.
>
>
> File set:
>
> # Makefile.am
> SUBDIRS = b
> noinst_PROGRAMS = foo
>
> # configure.ac
> AC_INIT([a],[0])
> AM_INIT_AUTOMAKE([foreign subdir-objects])
> AC_PROG_CC
> AC_CONFIG_FILES([Makefile b/Makefile])
> AC_OUTPUT
>
> # foo.c
> int main(void){return 0;}
>
> # b/Makefile.am
> noinst_PROGRAMS = bar
> bar_SOURCES = ../foo.c
>
>
> Observed:
>
> 01:43 wrgstfl:/dev/shm/testcase > make distclean
> Making distclean in b
> make[1]: Entering directory `/dev/shm/testcase/b'
> test -z "bar" || rm -f bar
> rm -f *.o
> rm -f ../*.o
> rm -f *.tab.c
> test -z "" || rm -f
> test . = "." || test -z "" || rm -f
> rm -f ../.deps/.dirstamp
> rm -f ../.dirstamp
> rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
> rm -rf ../.deps
> rm -f Makefile
> make[1]: Leaving directory `/dev/shm/testcase/b'
> make[1]: Entering directory `/dev/shm/testcase'
> Makefile:348: .deps/foo.Po: No such file or directory
> make[1]: *** No rule to make target `.deps/foo.Po'.  Stop.
> make[1]: Leaving directory `/dev/shm/testcase'
> make: *** [distclean-recursive] Error 1
>
>
> Expected:
>
> Don't fail.
>
>
> Additional information:
>
> The problem is also observable without using "..";
> foo_SOURCES = b/foo.c, bar_SOURCES = foo.c
> also yields the same issue that one .deps is gone before the Makefile of
> another directory is executed.
>
I would suggest using non-recursive builds, that solves many issues
this kind by giving make a better and complete view of the project
and its interdependencies.

I *might* end up fixing this bug if I manage to rework the dependency
tracking code to use the '-include' directive (which will require
dropping support for all make implementations not supporting such
directive, but I think that would be a good trade-off), but I'm not
making any promise.  You should keep in mind that non-recursive
builds are discouraged (except the very rare cases where the stuff
in a subdirectory is truly and completely independent from *all*
stuff in any other subdirectory), and we'll no longer actively work
on adding features or fixing bugs involving them.

Regards,
  Stefano




Added tag(s) wontfix. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 12:27:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17354 <at> debbugs.gnu.org and Jan Engelhardt <jengelh <at> inai.de> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 12:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Jan 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.