summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2016-10-16 19:28:44 +0000
committertb <tb@openbsd.org>2016-10-16 19:28:44 +0000
commitb718d5d4060a9739e82b8155dd5577cd678d1ad2 (patch)
treeb6e36c32facd986ca812c15055edd1b1519390fe
parentRemove some unused functions. Found by cppcheck from ports. (diff)
downloadwireguard-openbsd-b718d5d4060a9739e82b8155dd5577cd678d1ad2.tar.xz
wireguard-openbsd-b718d5d4060a9739e82b8155dd5577cd678d1ad2.zip
Move libcrypto, librpcsvc and gnu/usr.bin/cc/include from RDIRS to PRDIRS,
and add prereq targets, so some header files are generated by BUILDUSER during 'make prereq' instead of by root during 'make includes'. Switch the order of 'make cleandir' and 'make includes' during 'make build' so we don't generate many files twice. Except for some machine@ symlinks from ${MACHINE}/stand, /usr/obj is now clean from files generated by root during 'make build'. Those will be cleaned up in a second step. help, testing & ok deraadt, input from natano, further testing rpe
-rw-r--r--gnu/usr.bin/cc/include/Makefile8
-rw-r--r--include/Makefile11
-rw-r--r--lib/libcrypto/Makefile6
-rw-r--r--lib/librpcsvc/Makefile3
4 files changed, 18 insertions, 10 deletions
diff --git a/gnu/usr.bin/cc/include/Makefile b/gnu/usr.bin/cc/include/Makefile
index 64ea98e910e..66a486103ce 100644
--- a/gnu/usr.bin/cc/include/Makefile
+++ b/gnu/usr.bin/cc/include/Makefile
@@ -1,5 +1,5 @@
# $FreeBSD: src/gnu/usr.bin/cc/include/Makefile,v 1.9.8.1 2009/04/15 03:14:26 kensmith Exp $
-# $OpenBSD: Makefile,v 1.11 2016/09/01 11:03:09 patrick Exp $
+# $OpenBSD: Makefile,v 1.12 2016/10/16 19:28:44 tb Exp $
.include <bsd.own.mk>
@@ -44,6 +44,12 @@ cleandir: _SUBDIRUSE clean
depend:
# Nothing here so far...
+.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
+prereq: mm_malloc.h unwind.h
+.else
+prereq: unwind.h
+.endif
+
.if !empty(INCS)
install includes: ${INCS}
${INSTALL} -C -o ${BINOWN} -g ${LOCALEGRP} -m ${NONBINMODE} ${.ALLSRC} \
diff --git a/include/Makefile b/include/Makefile
index 818fd242204..e0feebcb5dc 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.213 2016/09/23 09:18:05 sthen Exp $
+# $OpenBSD: Makefile,v 1.214 2016/10/16 19:28:44 tb Exp $
# $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
@@ -29,14 +29,14 @@ LDIRS= crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
netmpls net80211 nfs ntfs scsi sys ufs uvm
# Places that need a prerequisite target met before includes
-PRDIRS=
+PRDIRS= ../lib/libcrypto ../lib/librpcsvc
# Directories with an includes target
-RDIRS= ../lib/libcrypto ../lib/libcurses ../lib/libedit \
+RDIRS= ../lib/libcurses ../lib/libedit \
../lib/libevent ../lib/libexpat ../lib/libform \
../lib/libfuse ../lib/libkeynote ../lib/libmenu \
../lib/libossaudio ../lib/libpanel ../lib/libpcap \
- ../lib/libradius ../lib/librpcsvc ../lib/librthread \
+ ../lib/libradius ../lib/librthread \
../lib/libskey ../lib/libssl ../lib/libtls \
../lib/libusbhid ../lib/libutil ../lib/libz \
../usr.bin/lex ../gnu/lib/libreadline \
@@ -47,8 +47,7 @@ RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
PRDIRS+= ../gnu/lib/libstdc++
.else
RDIRS+= ../gnu/usr.bin/cc/libobjc
-PRDIRS+= ../gnu/lib/libstdc++-v3
-RDIRS+= ../gnu/usr.bin/cc/include
+PRDIRS+= ../gnu/lib/libstdc++-v3 ../gnu/usr.bin/cc/include
.endif
# prereq implies includes
diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile
index fb12a60279b..173198dbab8 100644
--- a/lib/libcrypto/Makefile
+++ b/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2016/09/23 21:49:30 natano Exp $
+# $OpenBSD: Makefile,v 1.8 2016/10/16 19:28:44 tb Exp $
LIB= crypto
@@ -373,7 +373,9 @@ HDRS_GEN=\
${.CURDIR}/arch/${MACHINE_CPU}/opensslconf.h \
${.OBJDIR}/obj_mac.h
-includes: obj_mac.h
+prereq: obj_mac.h
+
+includes: prereq
@test -d ${DESTDIR}/usr/include/openssl || \
mkdir ${DESTDIR}/usr/include/openssl
@for i in $(HDRS); do \
diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile
index 438a9c6be28..05aadad85fd 100644
--- a/lib/librpcsvc/Makefile
+++ b/lib/librpcsvc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2012/08/02 13:38:39 okan Exp $
+# $OpenBSD: Makefile,v 1.11 2016/10/16 19:28:44 tb Exp $
RPCSRCS= bootparam_prot.x klm_prot.x mount.x nfs_prot.x \
@@ -13,6 +13,7 @@ NOMAN=
all: ${HDRS}
beforedepend: ${HDRS}
+prereq: ${HDRS}
includes: ${HDRS}
${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \