Jim Meyering <j...@meyering.net> writes: > Simon Josefsson wrote: >> Jim Meyering <j...@meyering.net> writes: >> >>> Simon Josefsson wrote: >>>> Eric Blake <ebl...@redhat.com> writes: >>> ... >>>> # Don't use Texinfo @acronym{} as it is not a good idea. >>>> sc_texinfo_acronym: >>>> - @grep -nE '@acronym{' \ >>>> - $$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') && \ >>>> + @if $(VC_LIST_EXCEPT) | grep -lE '\.texi$$' >/dev/null; then \ >>> >>> Hi Simon, >>> >>> I suggest you also check for .txi and .texinfo suffixes, >>> which probably means factoring out the regexps above and below. >>> Hmm... in fact, you could even make the regexp overridable: >>> >>> texinfo_suffix_re_ =? '\.(texi(nfo)?|txi)$$' >> >> Good idea! However I can't make this work, any ideas why the following >> doesn't work? >> >> # Don't use Texinfo @acronym{} as it is not a good idea. >> texinfo_suffix_re_ =? '\.(texi(nfo)?|txi)$$' >> sc_texinfo_acronym: >> @prohibit='@acronym{' \ >> in_vc_files=$(texinfo_suffix_re_) \ >> halt='found use of Texinfo @acronym{}' \ >> $(_sc_search_regexp) >> >> Results in: >> >> /bin/sh: \.(texi(nfo)?|txi)$: command not found >> maint.mk: Should specify either prohibit or require >> make: *** [sc_texinfo_acronym] Error 1 >> >> There are other places where maint.mk uses a variable with a string >> in_vc_files so I'm not sure what the problem is. > > Hi Simon, > > I didn't see it right away either ;-) > > s/=?/?=/
Heh, easy to miss. > Please use the following: > > # Don't use Texinfo @acronym{} as it is not a good idea. > texinfo_suffix_re_ ?= \\.(txi|texi(nfo)?)$$ > sc_texinfo_acronym: > @prohibit='@acronym\{' \ > in_vc_files='$(texinfo_suffix_re_)' \ > halt='found use of Texinfo @acronym{}' \ > $(_sc_search_regexp) Thanks, committed and pushed now, in your name since you did all the work here. /Simon