NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41700: :tr modifier for NetBSD make [patch]

The following reply was made to PR bin/41700; it has been noted by GNATS.

From: Roland Illig <>
Subject: Re: bin/41700: :tr modifier for NetBSD make [patch]
Date: Mon, 8 May 2023 22:42:59 +0200

 Hi Aleksey,
 Are you still interested in implementing the ':tr' modifier? The example
 you gave in the discussion on tech-userlevel can be simplified using a
 ':C' modifier for translating several characters to underscores.
 SIZEOF.${t:S|.|_|g:S|-|_|g:S|*|P|g:S|/|_|g:S|:|.|g}   !=3D   env
 SIZEOF.${t:C,[-./],_,g:S,*,P,g:S,:,.,g} !=3D env ${mkc.environ} ...
 Instead of repeating the complicated expression 3 times, you can compute
 it once in a nested .for loop:
 .for t in ...
 .  for tt in ${t:C,[-./],_,g:S,*,P,g:S,:,.,g}
 SIZEOF.${tt}!=3D env ${mkc.environ} ...
 .  endfor

Home | Main Index | Thread Index | Old Index