On 06/06/2012 06:15 PM, Stefano Lattarini wrote: > It can happen that the user legitimately employs what the new Automake-NG > make runtime warnings would take for an erroneous usage; for example, GNU > coreutils 8.17 uses something like this is its build system (see file > 'src/Makefile.am'): > > # Shared files. > copy_LDADD = > cp_LDADD += $(copy_LDADD) > ginstall_LDADD += $(copy_LDADD) > mv_LDADD += $(copy_LDADD) > ... > copy_LDADD += $(LIB_SELINUX) # for selinux use > copy_LDADD += $(LIB_CLOCK_GETTIME) # for gettime, settime, ... > copy_LDADD += $(LIB_XATTR) # for various xattr functions > ... > > Since it does so without having a program called 'copy' anywhere, the > Makefile generated by Automake complains like this: > > Makefile:2544: variable 'copy_LDADD' is defined but no program > Makefile:2544: or library has 'copy' as canonical name > Makefile:2546: *** Some Automake-NG error occurred. Stop. > > Instead of forcing the coreutils developers to heavily edit their Makefile, > it is better to allow them to whitelist their suspicious usages as correct. > And such a whitelisting capability is a good idea even regardless this > motivation, since it helps enforcing the Autotools- philosophy "the user is > always right" (as long as he is explicit enough). > > * lib/am/check-typos (.am/vartypos/whitelisted-vars ): Also add the contents > of the user-reserved variable '$(AM_VARTYPOS_WHITELIST)' (note that it is > still undocumented). > * t/vartypos-whitelist.sh: New test. >
Pushed now. Regards, Stefano
