Port the tags and strip-space rules from remote-gui's Makefile