Before calling 'make includes' during 'make build', the first two steps
are repetitions of what a direct 'make includes' does anyway, so move
the privdrop up there and simply call 'make includes' from 'make build'.
While there, use the exec idiom also for 'make cleandirs'.
ok?
Index: Makefile
===================================================================
RCS file: /var/cvs/src/Makefile,v
retrieving revision 1.127
diff -u -p -r1.127 Makefile
--- Makefile 5 Oct 2016 18:00:41 -0000 1.127
+++ Makefile 6 Oct 2016 11:31:46 -0000
@@ -50,7 +50,9 @@ regression-tests:
@cd ${.CURDIR}/regress && ${MAKE} depend && exec ${MAKE} regress
includes:
- cd ${.CURDIR}/include && ${MAKE} prereq && exec ${MAKE} includes
+ cd ${.CURDIR}/include && \
+ su ${BUILDUSER} -c 'exec ${MAKE} prereq' && \
+ exec ${MAKE} includes
beforeinstall:
cd ${.CURDIR}/etc && exec ${MAKE} DESTDIR=${DESTDIR} distrib-dirs
@@ -77,10 +79,8 @@ build:
false; \
fi
cd ${.CURDIR}/share/mk && exec ${MAKE} install
- cd ${.CURDIR}/include && \
- su ${BUILDUSER} -c 'exec ${MAKE} prereq' && \
- exec ${MAKE} includes
- ${MAKE} cleandir
+ exec ${MAKE} includes
+ exec ${MAKE} cleandir
cd ${.CURDIR}/lib && \
su ${BUILDUSER} -c '${MAKE} depend && exec ${MAKE}' && \
NOMAN=1 exec ${MAKE} install