=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/Makefile,v retrieving revision 1.127 retrieving revision 1.131 diff -u -r1.127 -r1.131 --- src/Makefile 2016/10/05 18:00:41 1.127 +++ src/Makefile 2016/11/19 14:20:58 1.131 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.127 2016/10/05 18:00:41 natano Exp $ +# $OpenBSD: Makefile,v 1.131 2016/11/19 14:20:58 tb Exp $ # # For more information on building in tricky environments, please see @@ -50,7 +50,9 @@ @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 @@ -69,18 +71,19 @@ @false .else build: + umask ${WOBJUMASK}; exec ${MAKE} do-build + +do-build: .ifdef GLOBAL_AUTOCONF_CACHE cp /dev/null ${GLOBAL_AUTOCONF_CACHE} .endif @if [[ `id -u` -ne 0 ]]; then \ - echo 'must be called by root' 2>&1; \ + echo $@ must be called by root >&2; \ 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} cleandir + exec ${MAKE} includes cd ${.CURDIR}/lib && \ su ${BUILDUSER} -c '${MAKE} depend && exec ${MAKE}' && \ NOMAN=1 exec ${MAKE} install