shithub: scc

Download patch

ref: 5babcf6a4140c21115b48c2694d918b78a8d0226
parent: 268eaf6cf283a9aa48a03d4a5c190ed6f7b39585
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Nov 29 08:57:20 EST 2016

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.

--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,18 @@
 
 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; \
@@ -21,12 +26,15 @@
 	ln -f cc1/cc1 bin/cc1-$@
 	ln -f cc2/cc2 bin/cc2-$@
 
+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