ref: e28bdf554314b3258e03c75683529604efff2e2a
parent: 0071983040ceacb18da2044a76619b2a92de3e71
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Feb 16 03:35:39 EST 2018
[driver/posix] Rename scpp to cpp Scc is portable now, so we can execute it in any PREFIX. Using this capability we can keep all the binaries in the rootdir directory and they will not conflict with the system utilities of the same name.
--- a/driver/posix/Makefile
+++ b/driver/posix/Makefile
@@ -11,9 +11,9 @@
../../inc/syslibs.h \
../../inc/ldflags.h
-all: scc scpp
+all: scc cpp
mkdir -p ../../rootdir/bin
- cp scc scpp ../../rootdir/bin/
+ cp scc cpp ../../rootdir/bin/
dep:
PREFIX=$(PREFIX) USEQBE=$(USEQBE) ./gendep.sh $(TARGETS)
@@ -23,13 +23,13 @@
scc: $(OBJ) $(LIBDIR)/libscc.a
$(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@
-scpp: cpp.sh config.h
+cpp: cpp.sh config.h
set -x ;\
trap "rm -f $$$$.sh" 0 2 3;\
rm -f $@ ;\
sed "s%@PREFIX@%$(PREFIX)%" < cpp.sh > $$$$.sh && \
chmod +x $$$$.sh && \
- mv $$$$.sh scpp
+ mv $$$$.sh $@
$(LIBDIR)/libscc.a:
+cd $(LIBDIR) && $(MAKE)