core: detect and reject build paths which contain an '@'
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 20 Aug 2018 20:49:53 +0000 (22:49 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 20 Oct 2018 18:50:48 +0000 (20:50 +0200)
commit7007dc2bc99ad191c418c468707cdc3980273cda
tree085ba8131ebb36d34dfc1676bffdd41272766226
parent4313544486c9606aa112cf7b06837a35802d6959
core: detect and reject build paths which contain an '@'

gcc does not build when the srcdir path contains a '@', because that
path is then substitued in a texi file as argument to an @include
directive. But then, the '@' in the path will start a command evaluation
of its own, thus breaking the build. For example, with a $(O) path set
to /home/ymorin/dev/buildroot/O/to@ti :

    perl ../../gcc/../contrib/texi2pod.pl ../../gcc/doc/invoke.texi > gcc.pod
    ../../gcc/doc/invoke.texi:1678: unknown command `ti'
    ../../gcc/doc/invoke.texi:1678: @include: could not find /home/ymorin/dev/buildroot/O/to/build/host-gcc-initial-7.3.0/build/gcc/../../gcc/../libiberty/at-file.texi

[Peter: use findstring instead of subst/compare]
Reported-by: c32 on IRC
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile