On 08/24/2017 11:35 AM, Mathieu Lirzin wrote: > Nick Bowler writes: >> On 8/23/17, Mathieu Lirzin wrote: >>> Michael Haubenwallner writes: >>>> Another thought about the final "$(LIBOBJS): .../.dirstamp" Makefile >>>> line: If I remember correctly, there have been (non-GNU) make >>>> implementations thatchoke on this rule when LIBOBJS is an empty >>>> variable: Am I wrong here, or is GNU make required anyway these days? >>> >>> GNU make is not required for current Automake version. I didn't find >>> any reference of this issue with empty variable target in Autoconf >>> "Portable Make programming" section [1] but if it is actually the case >>> then it would be nice to find a solution for that. >> >> POSIX requires that target rules specify at least one target. At least >> dmake will fail to parse the makefile if it contains an target rule with >> no targets: >> >> % cat >Makefile <<'EOF' >> FOO = >> dummy: ; >> $(FOO): ; >> EOF >> % dmake >> dmake: Makefile: line 3: Error: -- Missing targets or attributes in rule >> >> If the target list is a macro which can reasonably be empty then one >> solution is to add a bogus target name that won't be used anywhere >> else, along the lines of: >> >> gobbledegook $(FOO): ; > > Instead of this dummy target, I would rather prefer adding the dirstamp > dependency for each explicit object file separately. this should be computed > from the '%libsources' variable. However after a quick look in the code, it > seems that this variable is not properly populated by the > 'scan_autoconf_traces' subroutine. It only contains the files that are > explicitely defined by scanning the AC_LIBSOURCE macro and not by AC_LIBOBJ or > AC_LIBSOURCES in 'configure.ac'. > > Michael: Are you interested in looking into this? > Here's an attempt to use the explicit AC_LIBSOURCE values to depend on the LIBOBJDIR dirstamp. IMHO, tracing AC_LIBOBJ would not provide additional information over AC_LIBSOURCE, as AC_LIBOBJ by itself uses AC_LIBSOURCE. But then there is _AC_LIBOBJS_NORMALIZE, adding $U to {,LT}LIBOBJS values (seems referring to "Automake's ANSI2KNR"): What is this about? /haubi/