install [...] /etc/bash_completion.d/
This works fine in Ubuntu, but in Arch Bash completions are installed to
What would be the idiomatic GNU or POSIX
make way to handle this? I expect a nice solution would have something like these features:
- If the
installcommand fails, the target must fail.
- Traverse the list of directories in sequence as written. At the first directory which already exists (if any):
- Install the file if it does not exist,
- overwrite the file if it exists and is not up to date (according to
- skip the file if it exists and is up to date, and
- stop processing directories.
- It is not an error if the file is not installed anywhere.
It is not an error (nor should the
Makefileattempt to handle this case) if the file has already been installed in one directory, and subsequent runs installs it into another directory. That is, given a directory list
/a /b, if someone
- puts the file in
- then creates
Makefileshould not detect the presence of
- It is not an error if none of the directories exist.
- Feedback about which directories were attempted would be nice, but not mandatory.