Hi Dmitry, I've written some test to see what works and what doesn't:
$ cat Makefile
foo.h: FORCE
$(file > $@,$(foo))
@:
single:=\
double:=\\
empty:=
space:= #
define foo
Aa \\
Ba \$(single)
Bb \$(single)\
Bc $(single)\
Bd $(single)$(single)
Ca \$(double)
Cb \$(double)\
Cc $(double)\
Cd $(double)$(double)
Da \$(empty)
Db \$(empty)\
Dc $(empty)\
Ea \$(space)
Eb \$(space)\
Ec $(space)\
F
endef
FORCE:
$ make
$ cat foo.h
Aa \\
Ba \
Bb \ Bc Bd
Ca \\\
Cb \\\ Cc \\ Cd \\\\
Da \
Db \ Dc Ea \
Eb \ Ec F
So, the following work:
Ba \$(single)
Da \$(empty)
Ea \$(space)
Of course, $(single) is really empty, since the escape is used to escape
the newline in the definition. So I would go for \$(empty) or \$(space),
and for simplicity, I'd prefer \$(empty).
Dmitry, why did $\\ work for you ($\ being my $(empty)), and not for me
(as $(empty)\)?
Thanks,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
OpenPGP_signature
Description: OpenPGP digital signature
