Discussion:
No rule to make target 'bzr.mk', needed by 'all-am'
Sascha Manns
2017-09-29 14:26:25 UTC
Permalink
Hello list,

i have a project what provides a file called "bzr.mk". This isnt
generated and should just installed in $(datadir)/bzrmk.

For doing that i have a src/Makefile.am:
bzrmkdir = $(datadir)/bzrmk/
# Not generated
bzrmk_DATA = bzr.mk

But while building the package i'm getting:
Making all in src
make[3]: Entering directory '/build/bzrmk-1.2.1/src'
make[3]: *** No rule to make target 'bzr.mk', needed by 'all-
am'.  Stop.
make[3]: Leaving directory '/build/bzrmk-1.2.1/src'
Makefile:464: recipe for target 'all-recursive' failed

Full project's url: https://bazaar.launchpad.net/~sascha-manns-h/bzrmk/
trunk/files

Maybe anyone knows why make searches for a bzr.mk rule?

Greetings
Sascha
Sascha Manns
2017-09-29 15:19:24 UTC
Permalink
Post by Sascha Manns
Hello list,
i have a project what provides a file called "bzr.mk". This isnt
generated and should just installed in $(datadir)/bzrmk.
...
Making all in src
make[3]: Entering directory '/build/bzrmk-1.2.1/src'
make[3]: *** No rule to make target 'bzr.mk', needed by 'all-
am'.  Stop.
make[3]: Leaving directory '/build/bzrmk-1.2.1/src'
Makefile:464: recipe for target 'all-recursive' failed
I found it out. I'll did the from a tarball, generated with make dist.
Now i changed the src/Makefile.am, and included the bzr.mk in
EXTRA_DIST.

Now the build works :-)

Greetings
Sascha
Nick Bowler
2017-09-29 15:27:59 UTC
Permalink
Post by Sascha Manns
Post by Sascha Manns
i have a project what provides a file called "bzr.mk". This isnt
generated and should just installed in $(datadir)/bzrmk.
[...]
bzrmk_DATA = bzr.mk
Making all in src
make[3]: Entering directory '/build/bzrmk-1.2.1/src'
make[3]: *** No rule to make target 'bzr.mk', needed by 'all-
am'. Stop.
make[3]: Leaving directory '/build/bzrmk-1.2.1/src'
Makefile:464: recipe for target 'all-recursive' failed
I found it out. I'll did the from a tarball, generated with make dist.
Now i changed the src/Makefile.am, and included the bzr.mk in
EXTRA_DIST.
That'll work. Alternately you can use the dist_ prefix[1], e.g.,

dist_bzrmk_DATA = brz.mk

[1] https://www.gnu.org/software/automake/manual/automake.html#Fine_002dgrained-Distribution-Control

Cheers,
Nick
Sascha Manns
2017-09-29 22:30:03 UTC
Permalink
Post by Sascha Manns
Post by Sascha Manns
i have a project what provides a file called "bzr.mk". This isnt
generated and should just installed in $(datadir)/bzrmk.
[...]
bzrmk_DATA = bzr.mk
Making all in src
make[3]: Entering directory '/build/bzrmk-1.2.1/src'
make[3]: *** No rule to make target 'bzr.mk', needed by 'all-
am'.  Stop.
make[3]: Leaving directory '/build/bzrmk-1.2.1/src'
Makefile:464: recipe for target 'all-recursive' failed
I found it out. I'll did the from a tarball, generated with make dist.
Now i changed the src/Makefile.am, and included the bzr.mk in
EXTRA_DIST.
That'll work.  Alternately you can use the dist_ prefix[1], e.g.,
  dist_bzrmk_DATA = brz.mk
Yeah. That works perfectly. Thanks.

Greetings
Sascha

Mathieu Lirzin
2017-09-29 15:37:31 UTC
Permalink
Hello,
Post by Sascha Manns
i have a project what provides a file called "bzr.mk". This isnt
generated and should just installed in $(datadir)/bzrmk.
bzrmkdir = $(datadir)/bzrmk/
# Not generated
bzrmk_DATA = bzr.mk
Making all in src
make[3]: Entering directory '/build/bzrmk-1.2.1/src'
make[3]: *** No rule to make target 'bzr.mk', needed by 'all-
am'.  Stop.
make[3]: Leaving directory '/build/bzrmk-1.2.1/src'
Makefile:464: recipe for target 'all-recursive' failed
Full project's url: https://bazaar.launchpad.net/~sascha-manns-h/bzrmk/
trunk/files
When building from this repository, I have no issue with the
compilation.
Post by Sascha Manns
Maybe anyone knows why make searches for a bzr.mk rule?
My guess is that you are trying to build from a tarball generated with
'make dist'. If my guess is correct, then the issue is that
'src/bzr.mk' is not distributed. As described in the manual [1], 'DATA'
files are not distributed by default. so you need to prepend 'dist_' to
'bzrmk_DATA'.

HTH,
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37

[1] https://www.gnu.org/software/automake/manual/automake.html#Data
Loading...