Adds some documentation specific to the make
rule.
#1050
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I learned the hard way that the
make
build rule does not work out of the box with just any makefile, unlike other rules in this repository.The single
make
example does not emphasize this, and it is important for the usability of the rule.These are the things I learned:
make( targets = [...])
invocation must at least execute an equivalent ofmake install
, since allout_*
params are relative to the installation directory, not to either the source or the buidkl directory. So if your default target does not install anything, or you have ainstall
make target, but don't invoke it, bazel will be unable to find your build outputs.PREFIX=
env variable and use it, or have a different way of wiring the$$INSTALLDIR$$
make variable through.make install
recipe must ensure that it does not copy symlinks. This will bite you if you usecp $SOURCE DEST
instead ofcp -L $SOURCE $DEST
since the former will create a bunch of symlinks pointing to the sandbox. Which, of course, is useless once the sandbox is removed. Using-L
will ensure that the actual file contents arecopied.
Issue: #1049