GNU bug report logs -
#33022
Generated Makefile builds PROGRAMS before LTLIBRARIES
Previous Next
Full log
Message #8 received at 33022 <at> debbugs.gnu.org (full text, mbox):
Hello,
Mohamed Akram <mohd.akram <at> outlook.com> writes:
> automake’s behavior seems to have changed between 1.15.1 and 1.16.1:
>
> 1.15.1:
>
> all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
>
> 1.16.1:
>
> all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) config.h
>
> This causes an automake file which builds a library and a program that uses that library to fail.
>
> An example can be seen here - https://github.com/codebrainz/morse/issues/1#issuecomment-429200053.
The fact that when running ‘make’ in serial, some prerequisites of a
make rule are built before other ones is undefined behavior. Relying on
this when running ‘make’ in parallel mode is likely to result in a build
failure.
what needs to be done in ‘codebrainz’ is to add an explicit dependency
between programs and the libraries they depend on. See the following
example from the Automake manual:
lib_LTLIBRARIES = libgettext.la
libgettext_la_SOURCES = gettext.c ...
bin_PROGRAMS = hello
hello_SOURCES = hello.c ...
hello_LDADD = libgettext.la
Does it help?
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
This bug report was last modified 6 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.