Both cat and cat.shfiles exist, and cat.sh is newer than cat (if not,
the issue does not appear).
$ make -C test
make: Entering directory `/work1/jreybert/tmp/make_bug/test'
cat cat.sh >cat
chmod a+x cat
make: Leaving directory `/work1/jreybert/tmp/make_bug/test'
======== Golden =========
golden/cat: GIF image data, version 89a, 350 x 204
golden/cat.sh: a /usr/bin/env bash script, ASCII text executable
======== Test =========
test/cat: a /usr/bin/env bash script, ASCII text executable
test/cat.sh: a /usr/bin/env bash script, ASCII text executable
I can see that make overwrites cat
> cat cat.sh >cat
> chmod a+x cat
I also noticed that the bug appears only if cat.sh is newer that cat.
I believe that my Makefile is well written, but I may be wrong.
Adding .SUFFIXES: or calling make -r fixes my issue.