[hackers] [scc] Makefile: add support for DESTDIR installation || Quentin Rameau

From: <git_AT_suckless.org>
Date: Tue, 24 Jan 2017 15:33:25 +0100 (CET)

commit cd5cd2e925f70f972480a80b5a208056ef19cad4
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Tue Jan 24 14:37:01 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Jan 24 14:37:01 2017 +0100

    Makefile: add support for DESTDIR installation

diff --git a/Makefile b/Makefile
index 225c505..7aaabaa 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -32,21 +32,21 @@ tests: all
         cd tests/execute && $(MAKE) -e tests
 
 install: all
- mkdir -p $(PREFIX)/libexec/scc/
- mkdir -p $(PREFIX)/bin/
- mkdir -p $(PREFIX)/include/scc
- cp -f bin/cc?-* $(PREFIX)/libexec/scc/
- cp -f bin/cc1-$(ARCH) $(PREFIX)/bin/cpp
- cp -f bin/scc $(PREFIX)/bin/
- cp -fr libc/include/* $(PREFIX)/include/scc/
- find $(PREFIX)/include/scc/ -type f | xargs chmod 644
- cd $(PREFIX)/libexec/scc/ && chmod 755 cc* && strip cc*
- cd $(PREFIX)/bin && chmod 755 cpp scc && strip cpp scc
+ mkdir -p $(DESTDIR)/$(PREFIX)/libexec/scc/
+ mkdir -p $(DESTDIR)/$(PREFIX)/bin/
+ mkdir -p $(DESTDIR)/$(PREFIX)/include/scc
+ cp -f bin/cc?-* $(DESTDIR)/$(PREFIX)/libexec/scc/
+ cp -f bin/cc1-$(ARCH) $(DESTDIR)/$(PREFIX)/bin/cpp
+ cp -f bin/scc $(DESTDIR)/$(PREFIX)/bin/
+ cp -fr libc/include/* $(DESTDIR)/$(PREFIX)/include/scc/
+ find $(DESTDIR)/$(PREFIX)/include/scc/ -type f | xargs chmod 644
+ cd $(DESTDIR)/$(PREFIX)/libexec/scc/ && chmod 755 cc* && strip cc*
+ cd $(DESTDIR)/$(PREFIX)/bin && chmod 755 cpp scc && strip cpp scc
 
 uninstall:
- rm -rf $(PREFIX)/libexec/scc/
- rm -f $(PREFIX)/bin/scc
- rm -f $(PREFIX)/bin/cpp
+ rm -rf $(DESTDIR)/$(PREFIX)/libexec/scc/
+ rm -f $(DESTDIR)/$(PREFIX)/bin/scc
+ rm -f $(DESTDIR)/$(PREFIX)/bin/cpp
 
 clean-helper:
         for i in $(DIRS); \
Received on Tue Jan 24 2017 - 15:33:25 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 24 2017 - 15:36:21 CET