[CMAKE] Fix build with make as a generator
Summary:
There are a few issues preventing this build to succeed:
- There is a dependency issue in the NativeExecutable.cmake module: a
custom_command() cannot have a file dependency which is the output of
another custom_command() if this command is from another list file.
The solution here is to use a target dependency instead.
- Target naming with relative path is unsupported.
- The make generator differs in the way the build directories are
created, and require some manual creation.
- Since the generator name is Unix Makefiles, it should be quoted to
retain the space.
Test Plan:
# No regression cmake -GNinja .. ninja all check-all
cmake .. make all check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5333