Sure, this can work. Make treats everything like a file, including a symlink. It will check if the file exists (since you don't list any prerequisites, there is no timestamp comparison). In the case of a symlink it's really checking whatever the link points to, of course, not the link itself.
You don't show what happens when you do this but based on your description one of two things is happening: either (a) the contrib/openlayers directory doesn't exist so the ln command is generating an error and not creating the symlink so of course make will try to recreate it the next time it runs, or (b) your symlink is being created incorrectly and pointing to nothing, which means when make tries to see if it exists it fails and make will try to recreate it.
If, for example, your src
directory is a sibling of your contrib
directory, then your symlinks are just wrong; you'll get:
contrib/openlayers/theme -> src/openlayers/theme
Or, when the kernel tries to resolve it:
contrib/openlayers/src/openlayers/theme
It's highly unlikely that's what you want. I suggest you use something like this:
contrib/openlayers/theme:
mkdir -p contrib/openlayers
ln -s ../../src/openlayers/theme contrib/openlayers/theme
Then verify that the symlink, once created, actually points where you want it to go.