Hide make targets from shell when users autocomplete in bash

After studying the problem and coming up with a solution that I wrote in the first answer, I realized that there is another very simple way.

Just start the target's names you don't want to show beginning with a dot.

Example:

.PHONY: foo .hiddentarget
foo: foo.x .hiddentarget
foo.x: foo.c
        touch foo.x
.hiddentarget: foo.x
        echo foo.x ok, I believe

And that's all you need!

I came to this idea after trying to figure out how to prevent a target named .HIDDENGOALS being called by mistake and run all hidden goals. :)

Warning Although I don't see any, I'm not sure if there isn't any side effect on using target names like this ".targetname" (starting with a dot).