Subject: bug#7824: Automatic chaining of make suffix rules

From: Stefano Lattarini <[email-masked]>
Date: Mon, 23 Jul 2012 15:11:05 +0200

On 07/23/2012 02:49 PM, Юрий Пухальский wrote:
>
> [SNIP]
>
>>>
>>> Alas! My thing must be highly portable. I'm not sure who's guilty in
>>> this case, maybe HP,
>>>
>> Well, their make is busted in another, more relevant way:
>>
>>   <http://lists.gnu.org/archive/html/autoconf-patches/2011-01/msg00031.html>
>>
>> And the INSTALL file from Automake itself reads:
>>
>>    HP-UX `make' updates targets which have the same time stamps as
>>    their prerequisites, which makes it generally unusable when shipped
>>    generated files such as `configure' are involved.  Use GNU `make'
>>    instead.
>>
>> This behaviour of HP-UX also violates the POSIX standard.
>>
>> But back to your use case, the HP-UX issue at hand (not chaining suffix
>> rules automatically) is shared with at least another make implementation,
>> that is, Solaris XPG4 make.  But I usually don't care much about that
>> one, because Solaris users have other, much better make implementations
>> available from their vendor (that is, CCS make and Sun Distributed
>> make) which doesn't suffer from that limitation.
>>
Oops, I double checked, and It seems I got this wrong: Solaris CCS make
and Sun Distributed make do *not* support automatic chaining of suffix
rules in general :-/  They only support it if the intermediate target
appears as a dependency somewhere (which luckily is enough to make our
Lex/Yacc support -- which uses chains of suffix rules -- work correctly
with those makes; phfew!)

>> The *BSD makes don't
>> suffer from it either.  As for AIX, IRIX and OSF1/Tru64, I don't have
>> access to those systems, so I can't test how their make implementations
>> behave.
>
> I have aix 5.3 and aix 6.1 here. So if you tell me how it's best to
> check… 
>
You can use this Makefile:

  .SUFFIXES: .u .v .w
  .u.v: ; cp $< $@
  .v.w: ; cp $< $@

then "touch foo.u" and call "make foo.w".  If the file 'foo.w' is created
correctly, chaining of suffix rules is supported by the make implementation.

> As far as i remember i haven't had this very problem on AIX.
> 
>>> but probably kicking austin group for clarification is not that
>>> bad idea.
>>>
>> It's a pretty good one indeed.  Especially if you are volunteering :-)
>
> I've positive experience already. Ok, well, will put it to the list of
> thing to do.
> 

Thanks,
  Stefano