shithub: scc

Download patch

ref: 74b3f8fbc062af088bc005f0a15a1415a287352f
parent: f480a2c5373abf4290643600dd9376afd95a1cfb
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Jan 30 08:01:16 EST 2020

libc: Make more portable the Makefile

Plan9 tr was giving some errors when the option -s was used,
and to avoi them, a chain of tr and sed was used to avoid that
problem.

--- a/src/libc/rules.mk
+++ b/src/libc/rules.mk
@@ -11,8 +11,8 @@
 
 MKLST = \
 	echo $?  |\
-	tr ' ' '\n' |\
-	tr -s '\n' |\
+	sed 's/ /\n/g' |\
+	sed 's/^$$/d' |\
 	sed 's@^@$(PWD)/@' >> $(LIBCLST)
 
 # Rules