Hi,

When building bc, yacc can directly write bc.c instead of renaming
the file with mv. Does this look any better?

- Michael


Index: Makefile
===================================================================
RCS file: /cvs/src/usr.bin/bc/Makefile,v
retrieving revision 1.9
diff -u -p -u -r1.9 Makefile
--- Makefile    3 Jul 2017 00:17:52 -0000       1.9
+++ Makefile    4 Jul 2017 02:50:46 -0000
@@ -10,11 +10,10 @@ DPADD+=             ${LIBEDIT} ${LIBCURSES} ${LIBCR
 
 .PATH:         ${.CURDIR}/../dc
 
-bc.c y.tab.h: bc.y
-       ${YACC} -d ${.CURDIR}/bc.y
-       mv y.tab.c bc.c
+y.tab.h: bc.y
+       ${YACC} -o ${.CURDIR}/bc.c ${.CURDIR}/bc.y
 
-scan.o: y.tab.h
+bc.c scan.o: y.tab.h
 
 beforeinstall:
        install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \

Reply via email to