Skip to content

Commit 4ef1aab

Browse files
committed
Makefile: create parent directories
cp requires the destination directories to already exist. If they do not exist, it will fail. When packaging applications, it's common they are installed in an empty directory where the expected directory structure does not exist yet. Use `install -D` to copy the files to copy the files so that parent diretories are automatically created. Signed-off-by: Kevin Daudt <[email protected]>
1 parent fff5f43 commit 4ef1aab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ Documentation/html/git-filter-repo.html:
3434
git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html
3535

3636
install: snag_docs #fixup_locale
37-
cp -a git-filter-repo "$(bindir)/"
37+
install -Dm0755 git-filter-repo "$(bindir)/git-filter-repo"
38+
install -dm0755 "$(pythondir)"
3839
ln -sf "$(bindir)/git-filter-repo" "$(pythondir)/git_filter_repo.py"
39-
cp -a Documentation/man1/git-filter-repo.1 "$(mandir)/man1/git-filter-repo.1"
40-
cp -a Documentation/html/git-filter-repo.html "$(htmldir)/git-filter-repo.html"
40+
install -Dm0644 Documentation/man1/git-filter-repo.1 "$(mandir)/man1/git-filter-repo.1"
41+
install -Dm0644 Documentation/html/git-filter-repo.html "$(htmldir)/git-filter-repo.html"
4142
if which mandb > /dev/null; then mandb; fi
4243

4344

0 commit comments

Comments
 (0)