Relative paths work in many cases with add_custom_command and add_custom_target, and are covered by our test suite. It may be that paths starting in ../ do not quite work in the example’s case, but that would take some investigation.
the custom target depends on ALL and its commands are executed every time (custom targets are always out of date). You need to add_custom_command with OUTPUT mode to bring the output product up to date.
Both absolute and relative paths are allowed in this cases.