summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGrant Nichol <me@grantnichol.com>2022-06-12 15:41:43 -0500
committerGrant Nichol <me@grantnichol.com>2022-06-12 15:58:38 -0500
commit671a9b450b636f5a2ebfefe159fea44e3b615fad (patch)
tree3e571d1061219237877d8e2181fdd7c581b9f573 /Makefile
parent583f471cfe61f9f92d238ad2d2d9a9db29e40aa5 (diff)
Fix make install while files are in use
When the dwl executable is in use, cp fails without the -f flag. POSIX defines this flag with: > If a file descriptor for a destination file cannot be obtained, > as described in step 3.a.ii., attempt to unlink the destination > file and proceed.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ac24ae7..2c1782b 100644
--- a/Makefile
+++ b/Makefile
@@ -56,10 +56,10 @@ dist: clean
install: dwl
mkdir -p $(DESTDIR)$(PREFIX)/bin
- cp dwl $(DESTDIR)$(PREFIX)/bin
+ cp -f dwl $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwl
mkdir -p $(DESTDIR)$(MANDIR)/man1
- cp dwl.1 $(DESTDIR)$(MANDIR)/man1
+ cp -f dwl.1 $(DESTDIR)$(MANDIR)/man1
chmod 644 $(DESTDIR)$(MANDIR)/man1/dwl.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/dwl $(DESTDIR)$(MANDIR)/man1/dwl.1