Hi Paul, On 2023-09-03 04:06, Paul Smith wrote: > On Sun, 2023-09-03 at 01:00 +0200, Alejandro Colomar wrote: >> Is something like this possible? >> >> target: >> foo \ >> ifeq (...) >> | bar \ >> endif >> | baz > > I'm sure you've tried it and discovered the answer is "no". The > backslash will append the next line to the previous line and it won't > be considered a make statement. > > You need to put the ifdef outside the recipe: > > ifeq (...) > BAR = | bar > else > BAR = > endif > > target: > foo $(BAR) | baz
That would hurt readability a little bit. I think ONESHELL is calling me in whisper. :) Cheers, Alex -- <http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature