Re: [PATCH v2] automake: add install dep on install-libLTLIBRARIES to all targets

2021-09-10 Thread Karl Berry
Hi Jan and all.

depending on install-libLTLIBRARIES not just for bin_PROGRAMS, but
all PROGRAMS and LTLIBRARIES.

I installed your patch (for the record: the thread starts at
https://lists.gnu.org/archive/html/automake/2021-08/msg00016.html).
Thanks much.

(Now, on another and unrelated front ... time to see if I can restore
the previous Python dir behavior, retain the new setting with an option,
and not break anything new. I sure wish there was someone out there who
wanted to devote some real time to Automake maintenance.)

Happy hacking,
Karl



Re: [PATCH v2] automake: add install dep on install-libLTLIBRARIES to all targets

2021-08-29 Thread Jan Engelhardt
On Sunday 2021-08-29 22:44, Karl Berry wrote:

>Subject: [PATCH v2] automake: add install dep on install-libLTLIBRARIES to 
> all
>     targets
>
>Thanks. Have you run make check? (In practice, make -j12 check or similar.)
>Always good to make sure nothing old breaks ... -k

# TOTAL: 2980
# PASS:  2834
# SKIP:  107 [virtualenv not installed yadayada]
# XFAIL: 39
# FAIL:  0
# XPASS: 0
# ERROR: 0

External user who wanted to build some software also reports success
https://github.com/grommunio/gromox/issues/10



Re: [PATCH v2] automake: add install dep on install-libLTLIBRARIES to all targets

2021-08-29 Thread Karl Berry
Subject: [PATCH v2] automake: add install dep on install-libLTLIBRARIES to 
all
 targets

Thanks. Have you run make check? (In practice, make -j12 check or similar.)
Always good to make sure nothing old breaks ... -k



[PATCH v2] automake: add install dep on install-libLTLIBRARIES to all targets

2021-08-29 Thread Jan Engelhardt
A Makefile.am like

bin_PROGRAMS =
lib_LTLIBRARIES = library1.la
pkglib_LTLIBRARIES = library2.la
library2_LIBADD = library1.la

produces, in Makefile.in,

install-binPROGRAMS: install-libLTLIBRARIES

but no

install-pkglibLTLIBRARIES: install-libLTLIBRARIES

therefore potentially breaking `make install -j`. Rectify this by
depending on install-libLTLIBRARIES not just for bin_PROGRAMS, but
all PROGRAMS and LTLIBRARIES.

Signed-off-by: Jan Engelhardt 
---
Also available from https://github.com/jengelh/automake
if that is easier to download.

 bin/automake.in | 25 +++--
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git bin/automake.in bin/automake.in
index f04f5d5f5..30babd607 100644
--- bin/automake.in
+++ bin/automake.in
@@ -8042,13 +8042,26 @@ sub generate_makefile
   handle_all ($makefile);
 
   # FIXME: Gross!
-  if (var ('lib_LTLIBRARIES') && var ('bin_PROGRAMS'))
+  my $have_lt1 = !!var("lib_LTLIBRARIES");
+  my $have_lt2 = !!var("nobase_lib_LTLIBRARIES");
+  for my $var (variables("PROGRAMS"), variables("LTLIBRARIES"))
 {
-  $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
-}
-  if (var ('nobase_lib_LTLIBRARIES') && var ('bin_PROGRAMS'))
-{
-  $output_rules .= "install-binPROGRAMS: 
install-nobase_libLTLIBRARIES\n\n";
+  if ($var->name eq "lib_LTLIBRARIES"
+  || $var->name eq "nobase_lib_LTLIBRARIES"
+  || substr($var->name, 0, 7) eq "noinst_")
+{
+  next;
+}
+  my $shortname = $var->name;
+  $shortname =~ tr{_}{}d;
+  if ($have_lt1)
+{
+  $output_rules .= "install-$shortname: install-libLTLIBRARIES\n\n";
+}
+  if ($have_lt2)
+{
+  $output_rules .= "install-$shortname: 
install-nobase_libLTLIBRARIES\n\n";
+}
 }
 
   handle_install;
-- 
2.32.0