bug#21956: subdir-objecs dies with "rm: cannot remove 'emxp_cm_bl': Is a directory", even git version

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#21956: subdir-objecs dies with "rm: cannot remove 'emxp_cm_bl': Is a directory", even git version

Joakim Tjernlund
automake>= 1.13 (did not test lower than that) dies during make with:
 CCLD     emxp_cm_bl_shell
 rm: cannot remove 'emxp_cm_bl': Is a directory
 Makefile:1070: recipe for target 'emxp_cm_bl' failed

This happens if you have the same name on the containing directory and
in bin_PROGRAMS, like so
  bin_PROGRAMS = emxp_hw_bl
  emxp_hw_bl_SOURCES = emxp_hw_bl/emxp_hw_bl.c

Here is the offending Makefile snippet:
emxp_hw_bl$(EXEEXT): $(emxp_hw_bl_OBJECTS) $(emxp_hw_bl_DEPENDENCIES) $(EXTRA_emxp_hw_bl_DEPENDENCIES)
        rm -f emxp_hw_bl$(EXEEXT)
        $(AM_V_CCLD)$(emxp_hw_bl_LINK) $(emxp_hw_bl_OBJECTS) $(emxp_hw_bl_LDADD) $(LIBS)


Reply | Threaded
Open this post in threaded view
|

bug#21956: subdir-objecs dies with "rm: cannot remove 'emxp_cm_bl': Is a directory", even git version

Peter Johansson-6
Hi Joakim,

On 11/19/2015 11:15 AM, Joakim Tjernlund wrote:
> automake>= 1.13 (did not test lower than that) dies during make with:
>   CCLD     emxp_cm_bl_shell
>   rm: cannot remove 'emxp_cm_bl': Is a directory
>   Makefile:1070: recipe for target 'emxp_cm_bl' failed
>
> This happens if you have the same name on the containing directory and
> in bin_PROGRAMS, like so
>    bin_PROGRAMS = emxp_hw_bl

You try to create a program named 'emxp_hw_bl'.

>    emxp_hw_bl_SOURCES = emxp_hw_bl/emxp_hw_bl.c

But that name is already taken by the directory (in which the source
files resides).

If you think this is a bug, what do you think is the preferable behaviour?

Cheers,
Peter



Reply | Threaded
Open this post in threaded view
|

bug#21956: subdir-objecs dies with "rm: cannot remove 'emxp_cm_bl': Is a directory", even git version

Joakim Tjernlund
On Thu, 2015-11-19 at 15:54 +1000, Peter Johansson wrote:

> Hi Joakim,
>
> On 11/19/2015 11:15 AM, Joakim Tjernlund wrote:
> > automake>= 1.13 (did not test lower than that) dies during make with:
> >   CCLD     emxp_cm_bl_shell
> >   rm: cannot remove 'emxp_cm_bl': Is a directory
> >   Makefile:1070: recipe for target 'emxp_cm_bl' failed
> >
> > This happens if you have the same name on the containing directory and
> > in bin_PROGRAMS, like so
> >    bin_PROGRAMS = emxp_hw_bl
>
> You try to create a program named 'emxp_hw_bl'.
>
> >    emxp_hw_bl_SOURCES = emxp_hw_bl/emxp_hw_bl.c
>
> But that name is already taken by the directory (in which the source
> files resides).
>
> If you think this is a bug, what do you think is the preferable behaviour?

hmm, I see the problem.

How do I change Makefile.am, with minimal effort as we have alot of them?
Tried 
  bin_PROGRAMS += emxp_hw_bl/emxp_hw_bl
but that gives me:
ne/emxp_ss/emxp_hw_bl/Makefile.inc:14: warning: variable 'emxp_hw_bl_SOURCES' is defined but no program or
ne/emxp_ss/emxp_hw_bl/Makefile.inc:14: library has 'emxp_hw_bl' as canonical name (possible typo)
ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here
ne/emxp_ss/emxp_hw_bl/Makefile.inc:1: warning: variable 'emxp_hw_bl_LDADD' is defined but no program or
ne/emxp_ss/emxp_hw_bl/Makefile.inc:1: library has 'emxp_hw_bl' as canonical name (possible typo)
ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here
ne/emxp_ss/emxp_hw_bl/Makefile.inc:2: warning: variable 'emxp_hw_bl_common_LDADD' is defined but no program or
ne/emxp_ss/emxp_hw_bl/Makefile.inc:2: library has 'emxp_hw_bl_common' as canonical name (possible typo)
ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here


Reply | Threaded
Open this post in threaded view
|

bug#21956: subdir-objecs dies with "rm: cannot remove 'emxp_cm_bl': Is a directory", even git version

Peter Johansson-6


On 11/19/2015 06:19 PM, Joakim Tjernlund wrote:

> hmm, I see the problem.
>
> How do I change Makefile.am, with minimal effort as we have alot of them?
> Tried
>    bin_PROGRAMS += emxp_hw_bl/emxp_hw_bl
> but that gives me:
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:14: warning: variable 'emxp_hw_bl_SOURCES' is defined but no program or
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:14: library has 'emxp_hw_bl' as canonical name (possible typo)
> ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:1: warning: variable 'emxp_hw_bl_LDADD' is defined but no program or
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:1: library has 'emxp_hw_bl' as canonical name (possible typo)
> ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:2: warning: variable 'emxp_hw_bl_common_LDADD' is defined but no program or
> ne/emxp_ss/emxp_hw_bl/Makefile.inc:2: library has 'emxp_hw_bl_common' as canonical name (possible typo)
> ne/emxp_ss/Makefile.am:15:   'ne/emxp_ss/emxp_hw_bl/Makefile.inc' included from here
It looks like you haven't changed variable names e.g.
'emxp_hw_bl_SOURCES' to 'emxp_hw_bl/emxp_hw_bl_SOURCES'.

Cheers,
Peter