[hackers] [scc] Fix install target of Makefile || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 29 Nov 2016 13:59:24 +0100 (CET)

commit f57e3cdeac2d25eb24daf43d5d233edea659f09c
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Nov 29 13:57:20 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Nov 29 13:57:20 2016 +0100

    Fix install target of Makefile
    
    After last changes in the Makefile the install target was
    broken. This commits fix them and since there is not
    a cc1 program anymore it uses the cc1 of the default
    architecture as base for cpp.

diff --git a/Makefile b/Makefile
index 756bbb4..011274b 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -6,13 +6,18 @@ include config.mk
 
 DIRS = lib cc1 cc2 driver/$(DRIVER)
 
-all:
+all: driver/$(DRIVER)/scc
         for i in $(ARCHS); \
         do \
                 $(MAKE) $$i || exit; \
         done
 
-$(ARCHS):
+driver/$(DRIVER)/scc: bin
+ cd driver/$(DRIVER)/ && $(MAKE) scc
+ cp -f driver/$(DRIVER)/scc bin/scc
+
+$(ARCHS): bin
+ mkdir -p bin
         for i in cc1 cc2; \
         do \
                 (cd $$i; \
_AT_@ -21,12 +26,15 @@ $(ARCHS):
         ln -f cc1/cc1 bin/cc1-$_AT_
         ln -f cc2/cc2 bin/cc2-$_AT_
 
+bin:
+ mkdir -p bin
+
 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 $(PREFIX)/bin/cpp
+ 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
Received on Tue Nov 29 2016 - 13:59:24 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 29 2016 - 14:00:16 CET