Hello Mathieu, Karl,
On 2019-08-24 11:43 a.m., Mathieu Lirzin wrote:
On Sat, 24 Aug 2019, Assaf Gordon wrote:
I've encountered a problem where a released tarball (of 'make dist')
generated by Automake-1.16.1 fails to build with non-gnu make (e.g.
"bmake" on BSDs).
The exact same project and 'make dist' with automake-1.15 builds fine.
One convenient way to detect what caused this problem would be to do a
‘git bisect’ session on Automake VCS repository and analyse the diff of
the commit introducing the failure.
The offending commit is:
---
https://git.sv.gnu.org/cgit/automake.git/commit/?id=f4e91bfc
commit f4e91bfc490da63209aad19636568da3b955dcd4
Date: Mon Mar 13 12:41:59 2017 +0100
automake: Shorter object file names under subdir-objects
Combining the 'subdir-objects' option with target-specific flags had
the consequence of producing long object file names. This was done to
preventively ensure the uniqueness of object file names. We are now
using shorter names by default, and handle long names when an actual
conflict is detected. This will hopefully reduce the necessity of
using the 'prog_SHORTNAME' facility.
Example:
previously:
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS += path/to/foo
path_to_foo_CFLAGS = $(AM_CFLAGS) -g
resulted in objects:
sub/path_to_foo-foo.o
now object file name is:
sub/foo-foo.o
---
On 2019-08-24 3:14 p.m., Karl Berry wrote:> Low-tech idea similar to git
bisect: do the 1.15 build and 1.16
build in separate dirs, diff -r the Makefile.am's.
Good idea.
I'm attaching the diff of the Makefile.in (which is the file generated
by automake) when building "gnu hello".
Some targets changed location in the file, but I don't think that matters.
The one thing the pops up is that in the "good" version,
there are "distdir distdir-am dist dist-all" targets,
while in the "bad" version there is no "distdir-am" target.
Later on there's this:
====
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
====
I tested by simply doing:
git clone git://git.sv.gnu.org/hello.git
cd hello
./bootstrap
./configure
bmake
Once with automake commit f4e91bfc (bad one),
and once with the preceeding commit c946ae (good one).
-----
investigation continues...
thanks,
- assaf
--- hello-AM-GOOD/Makefile.in 2019-08-24 14:58:59.000000000 -0600
+++ hello-AM-BAD/Makefile.in 2019-08-24 14:51:22.000000000 -0600
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15a from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -249,6 +249,9 @@
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
+ "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
@@ -296,9 +299,6 @@
lib/xalloc-die.$(OBJEXT) lib/xstriconv.$(OBJEXT) \
lib/xstrndup.$(OBJEXT)
lib_libhello_a_OBJECTS = $(am_lib_libhello_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS)
am_hello_OBJECTS = src/hello.$(OBJEXT)
hello_OBJECTS = $(am_hello_OBJECTS)
hello_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@@ -458,7 +458,8 @@
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- cscope check recheck distdir dist dist-all distcheck
+ cscope check recheck distdir distdir-am dist dist-all \
+ distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.in
# Read a list of newline-separated strings from the standard input,
@@ -1677,6 +1678,48 @@
distclean-hdr:
-rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -1818,48 +1861,6 @@
$(AM_V_at)-rm -f lib/libhello.a
$(AM_V_AR)$(lib_libhello_a_AR) lib/libhello.a $(lib_libhello_a_OBJECTS) $(lib_libhello_a_LIBADD)
$(AM_V_at)$(RANLIB) lib/libhello.a
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
- fi; \
- for p in $$list; do echo "$$p $$p"; done | \
- sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p \
- ; then echo "$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n;h' \
- -e 's|.*|.|' \
- -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
- sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) files[d] = files[d] " " $$1; \
- else { print "f", $$3 "/" $$4, $$1; } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' \
- `; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
src/$(am__dirstamp):
@$(MKDIR_P) src
@: > src/$(am__dirstamp)
@@ -2395,7 +2396,7 @@
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS:
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -2487,7 +2488,10 @@
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -2682,7 +2686,7 @@
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(PROGRAMS) $(MANS) \
+all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(LIBRARIES) $(MANS) \
config.h
installdirs: installdirs-recursive
installdirs-am: