shithub: scc

Download patch

ref: a8cf09fa62a1c07911bf78052af93a632c5634c4
parent: 393b9c624f92f4f85349a589049c190825b28bb5
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Sep 21 09:00:37 EDT 2017

Revert "Move library geneartion rule to libdep.mk"

This reverts commit 5b88d5faa321fd71a734d5c957c162aad46d7daf.
This commit was generating two actions for the same target in
the lib/scc Makefile.

--- a/as/Makefile
+++ b/as/Makefile
@@ -15,6 +15,9 @@
 as: $(OBJ)
 	$(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@
 
+$(LIBDIR)/libscc.a: $(LIB-OBJ)
+	cd $(LIBDIR) && $(MAKE)
+
 dep: ../config.mk Makefile
 	./gendep.sh $(TARGETS)
 	touch dep
--- a/cc1/Makefile
+++ b/cc1/Makefile
@@ -18,6 +18,9 @@
 	mkdir -p ../rootdir/libexec/scc/
 	cp cc1-* ../rootdir/libexec/scc/
 
+$(LIBDIR)/libscc.a: $(LIB-OBJ)
+	cd $(LIBDIR) && $(MAKE)
+
 dep: ../config.mk Makefile
 	./gendep.sh $(TARGETS)
 	touch dep
--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -20,6 +20,9 @@
 	MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
 	touch dep
 
+$(LIBDIR)/libscc.a: $(LIB-OBJ)
+	cd $(LIBDIR) && $(MAKE)
+
 main.o: error.h
 
 error.h: cc2.h
--- a/lib/scc/libdep.mk
+++ b/lib/scc/libdep.mk
@@ -6,8 +6,3 @@
           $(LIBDIR)/xrealloc.o \
           $(LIBDIR)/xstrdup.o \
           $(LIBDIR)/alloc.o \
-
-all:
-
-$(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)