To pursue something illusory, impractical, or impossible.
To go on a wild-goose chase; to persistently engage in a futile activity.
To attack imaginary enemies.