Discussion:
make distclean
Juergen Sauermann
2016-03-17 15:28:18 UTC
Permalink
Hi,

I have received a bug-report saying that 'make distclean' fails for GNU APL.

The error message is this:

make[2]: Entering directory `/home/eedjsa/projects/juergen/apl-1.5/src'
Makefile:837: .deps/apl-Archive.Po: No such file or directory
Makefile:838: .deps/apl-ArrayIterator.Po: No such file or directory
Makefile:839: .deps/apl-Assert.Po: No such file or directory
Makefile:840: .deps/apl-Avec.Po: No such file or directory
Makefile:841: .deps/apl-Backtrace.Po: No such file or directory
...
Makefile:916: .deps/apl-Workspace.Po: No such file or directory
Makefile:917: .deps/apl-configure_args.Po: No such file or directory
Makefile:918: .deps/apl-main.Po: No such file or directory
Makefile:919: .deps/libapl_la-Archive.Plo: No such file or directory
Makefile:920: .deps/libapl_la-ArrayIterator.Plo: No such file or directory
Makefile:921: .deps/libapl_la-Assert.Plo: No such file or directory
Makefile:922: .deps/libapl_la-Avec.Plo: No such file or directory
Makefile:923: .deps/libapl_la-Backtrace.Plo: No such file or directory
...
Makefile:998: .deps/libapl_la-Workspace.Plo: No such file or directory
Makefile:999: .deps/libapl_la-configure_args.Plo: No such file or directory
Makefile:1000: .deps/libapl_la-libapl.Plo: No such file or directory
make[2]: *** No rule to make target `.deps/libapl_la-libapl.Plo'. Stop.
make[2]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make: *** [distclean-recursive] Error 1

----------------------------------------------------------------------------------------------------

From what I can see:

(1) the libapl related files should not be deleted in the first place .
The Makefile.am (attached) uses:

if WANT_LIBAPL

which is an AM_CONDITIONAL() and the project was NOT ./configure'd to
build libapl

(2) why would 'make distclean' try (and then fail) to build any targets
in the first place?

Shouldn't it just delete files created by ./configure and be happy if
they are gone?

------------------------------------------------------
automake version is 1.14.1
autoconf version is 2.69

The whole project is at http://svn.savannah.gnu.org/viewvc/trunk/?root=apl

Sometimes make distclean works, but I haven't figured when.

Thanks,
JÃŒrgen Sauermann
Peter Johansson
2016-03-17 23:02:16 UTC
Permalink
Hi Jürgen,
Post by Juergen Sauermann
Hi,
I have received a bug-report saying that 'make distclean' fails for GNU APL.
make[2]: Entering directory `/home/eedjsa/projects/juergen/apl-1.5/src'
Makefile:837: .deps/apl-Archive.Po: No such file or directory
Makefile:838: .deps/apl-ArrayIterator.Po: No such file or directory
Makefile:839: .deps/apl-Assert.Po: No such file or directory
Makefile:840: .deps/apl-Avec.Po: No such file or directory
Makefile:841: .deps/apl-Backtrace.Po: No such file or directory
...
Makefile:916: .deps/apl-Workspace.Po: No such file or directory
Makefile:917: .deps/apl-configure_args.Po: No such file or directory
Makefile:918: .deps/apl-main.Po: No such file or directory
Makefile:919: .deps/libapl_la-Archive.Plo: No such file or directory
Makefile:920: .deps/libapl_la-ArrayIterator.Plo: No such file or directory
Makefile:921: .deps/libapl_la-Assert.Plo: No such file or directory
Makefile:922: .deps/libapl_la-Avec.Plo: No such file or directory
Makefile:923: .deps/libapl_la-Backtrace.Plo: No such file or directory
...
Makefile:998: .deps/libapl_la-Workspace.Plo: No such file or directory
Makefile:999: .deps/libapl_la-configure_args.Plo: No such file or directory
Makefile:1000: .deps/libapl_la-libapl.Plo: No such file or directory
make[2]: *** No rule to make target `.deps/libapl_la-libapl.Plo'. Stop.
make[2]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make: *** [distclean-recursive] Error 1
----------------------------------------------------------------------------------------------------
Hard to tell what's going on here without seeing the message from 'make
distclean' before the error message.
Post by Juergen Sauermann
(1) the libapl related files should not be deleted in the first place .
Well, 'make distclean' always deletes directory '.deps' if their's
compilation going on.
Post by Juergen Sauermann
if WANT_LIBAPL
which is an AM_CONDITIONAL() and the project was NOT ./configure'd to
build libapl
(2) why would 'make distclean' try (and then fail) to build any
targets in the first place?
It's not trying to build anything. It's trying to remove deps files,
which are created by configure (and usually updated by the compiler).
Post by Juergen Sauermann
Shouldn't it just delete files created by ./configure and be happy if
they are gone?
Cheers,
Peter
Juergen Sauermann
2016-03-18 11:36:13 UTC
Permalink
Hi Peter,

thanks for looking into this.

Attached is the full log (shortest way to reproduce the problem.
I could have run 'make all' as well bu the result would be the same.

What puzzles me the most is the message:

make[2]: *** No rule to make target `.deps/libapl_la-libapl.Plo'. Stop.

because why would 'make distclean' even try to make that target?

Thanks,
JÃŒrgen
Hi JÃŒrgen,
Post by Juergen Sauermann
Hi,
I have received a bug-report saying that 'make distclean' fails for GNU APL.
make[2]: Entering directory `/home/eedjsa/projects/juergen/apl-1.5/src'
Makefile:837: .deps/apl-Archive.Po: No such file or directory
Makefile:838: .deps/apl-ArrayIterator.Po: No such file or directory
Makefile:839: .deps/apl-Assert.Po: No such file or directory
Makefile:840: .deps/apl-Avec.Po: No such file or directory
Makefile:841: .deps/apl-Backtrace.Po: No such file or directory
...
Makefile:916: .deps/apl-Workspace.Po: No such file or directory
Makefile:917: .deps/apl-configure_args.Po: No such file or directory
Makefile:918: .deps/apl-main.Po: No such file or directory
Makefile:919: .deps/libapl_la-Archive.Plo: No such file or directory
Makefile:920: .deps/libapl_la-ArrayIterator.Plo: No such file or directory
Makefile:921: .deps/libapl_la-Assert.Plo: No such file or directory
Makefile:922: .deps/libapl_la-Avec.Plo: No such file or directory
Makefile:923: .deps/libapl_la-Backtrace.Plo: No such file or directory
...
Makefile:998: .deps/libapl_la-Workspace.Plo: No such file or directory
Makefile:999: .deps/libapl_la-configure_args.Plo: No such file or directory
Makefile:1000: .deps/libapl_la-libapl.Plo: No such file or directory
make[2]: *** No rule to make target `.deps/libapl_la-libapl.Plo'. Stop.
make[2]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src'
make: *** [distclean-recursive] Error 1
----------------------------------------------------------------------------------------------------
Hard to tell what's going on here without seeing the message from
'make distclean' before the error message.
Post by Juergen Sauermann
(1) the libapl related files should not be deleted in the first place .
Well, 'make distclean' always deletes directory '.deps' if their's
compilation going on.
Post by Juergen Sauermann
if WANT_LIBAPL
which is an AM_CONDITIONAL() and the project was NOT ./configure'd to
build libapl
(2) why would 'make distclean' try (and then fail) to build any
targets in the first place?
It's not trying to build anything. It's trying to remove deps files,
which are created by configure (and usually updated by the compiler).
Post by Juergen Sauermann
Shouldn't it just delete files created by ./configure and be happy if
they are gone?
Cheers,
Peter
Juergen Sauermann
2016-03-18 15:47:59 UTC
Permalink
Hi Mike,

I am not using the subdir-objects option. Should I ?

Also, if I

./configure
make distcleran

then the compiler will not yet have been run.
But your explanation have given me an idea: if I remove the .deps directory
manually then 'make distclean' seems to work again.

Not very nice but at least work-around.

Thanks,
Jürgen
Post by Juergen Sauermann
Attached is the full log (shortest way to reproduce the problem.
I could have run 'make all' as well bu the result would be the same.
make[2]: *** No rule to make target `.deps/libapl_la-libapl.Plo'. Stop.
because why would 'make distclean' even try to make that target?
Thanks for the full log, that gives enough information to explain this.
Makefiles include all of the files in .deps (as a make include). Make
treates included files as prerequisites of the makefile itself, so they
need to exist in order for any target to run, including any *clean
targets.
Turns out from your log file that a subdirectory of src is removing the
Post by Juergen Sauermann
make[2]: Entering directory `/home/eedjsa/projects/juergen/apl-1.5/src/APs'
rm -rf .libs _libs
rm -f *.o
rm -f AP100 AP210 APserver
rm -f *.lo
rm -f *.tab.c
test -z "" || rm -f
rm -f ../*.o
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
test . = "." || test -z "" || rm -f
rm -f ../.deps/.dirstamp
rm -f ../.dirstamp
rm -rf ../.deps ./.deps
rm -f Makefile
make[2]: Leaving directory `/home/eedjsa/projects/juergen/apl-1.5/src/APs'
This is probably why when 'distclean' returns to src, its .deps files
are already removed and the makefile errors out.
Are sources from the parent directory being built in the src/APs subdir
and you're using the 'subdir-objects' option?
Loading...