ref: 9df2bb4ed45bb22397cb50cde8fcfcb83c986a0f
parent: 8b178526d17c09010b94b2c6655c0c98648a2f68
author: Quentin Rameau <quinq@fifth.space>
date: Tue Aug 29 08:52:01 EDT 2017
Makefile: remove the / between DESTDIR and PREFIX Thanks to tarug0 and 20h for the suggestion. Responsabilize the user to use absolute path instead of trying to secure it internally.
--- a/Makefile
+++ b/Makefile
@@ -35,12 +35,12 @@
cd tests && $(MAKE) -e all
install: all
- cp -r rootdir/* $(DESTDIR)/$(PREFIX)/
- cd $(DESTDIR)/$(PREFIX)/libexec/scc/ && chmod 755 cc* && strip cc*
- cd $(DESTDIR)/$(PREFIX)/bin && chmod 755 scpp scc && strip scc
+ cp -r rootdir/* $(DESTDIR)$(PREFIX)/
+ cd $(DESTDIR)$(PREFIX)/libexec/scc/ && chmod 755 cc* && strip cc*
+ cd $(DESTDIR)$(PREFIX)/bin && chmod 755 scpp scc && strip scc
uninstall:
- rm -rf $(DESTDIR)/$(PREFIX)/libexec/scc/
- rm -rf $(DESTDIR)/$(PREFIX)/lib/scc/
- rm -f $(DESTDIR)/$(PREFIX)/bin/scc
- rm -f $(DESTDIR)/$(PREFIX)/bin/scpp
+ rm -rf $(DESTDIR)$(PREFIX)/libexec/scc/
+ rm -rf $(DESTDIR)$(PREFIX)/lib/scc/
+ rm -f $(DESTDIR)$(PREFIX)/bin/scc
+ rm -f $(DESTDIR)$(PREFIX)/bin/scpp