aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/mk/sys
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2020-05-20 22:25:46 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2020-05-20 22:25:46 +0000
commit49caa483b3fafffd9cf5197eb30e8bb235aa7410 (patch)
tree9ee636872e19ac361f51f9f97990c7fa142c2fb6 /contrib/bmake/mk/sys
parent4f98ffdd1da28744fbcf31d3d818fc17ea30cb5e (diff)
parentb897d72a5adf5cfad8c79f90e155bae99bdde48c (diff)
Merge bmake-20200517
Changes since 20181221 are mostly portability related hence the large gap in versions imported. There are however some bug fixes, and a rework of filemon handling. In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace and elimination of filemon(4) which has not had the TLC it needs. FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c allows use of that, with a bit less overhead than the ktrace model. Summary of changes from ChangeLog o str.c: empty string does not match % pattern plus unit-test changes o var.c: import handling of old sysV style modifier using '%' o str.c: refactor brk_string o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD a blank command is perfectly valid. o meta.c: meta_oodate, check for corrupted meta file earlier and more often. * meta.c: meta_compat_parent check for USE_FILEMON patch from Soeren Tempel o meta.c: fix compat mode, need to call meta_job_output() o job.c: extra fds for meta mode not needed if using filemon_dev o meta.c: avoid passing NULL to filemon_*() when meta_needed() returns FALSE. o filemon/filemon_{dev,ktrace}.c: allow selection of filemon implementation. filemon_dev.c uses the kernel module while filemon_ktrace.c leverages the fktrace api available in NetBSD. filemon_ktrace.c can hopefully form the basis for adding support for other tracing mechanisms such as strace on Linux. o meta.c: when target is out-of-date per normal make rules record value of .OODATE in meta file. o parse.c: don't pass NULL to realpath(3) some versions cannot handle it. o parse.c: ParseDoDependency: free paths rather than assert plus more unit-tests
Notes
Notes: svn path=/head/; revision=361307
Diffstat (limited to 'contrib/bmake/mk/sys')
-rw-r--r--contrib/bmake/mk/sys/AIX.mk2
-rw-r--r--contrib/bmake/mk/sys/Darwin.mk27
-rw-r--r--contrib/bmake/mk/sys/Generic.mk4
-rw-r--r--contrib/bmake/mk/sys/HP-UX.mk4
-rw-r--r--contrib/bmake/mk/sys/IRIX.mk2
-rw-r--r--contrib/bmake/mk/sys/Linux.mk4
-rw-r--r--contrib/bmake/mk/sys/NetBSD.mk2
-rw-r--r--contrib/bmake/mk/sys/OSF1.mk4
-rw-r--r--contrib/bmake/mk/sys/OpenBSD.mk2
-rw-r--r--contrib/bmake/mk/sys/SunOS.mk4
-rw-r--r--contrib/bmake/mk/sys/UnixWare.mk4
11 files changed, 27 insertions, 32 deletions
diff --git a/contrib/bmake/mk/sys/AIX.mk b/contrib/bmake/mk/sys/AIX.mk
index 895b92f17cc3..a5c49584fe2c 100644
--- a/contrib/bmake/mk/sys/AIX.mk
+++ b/contrib/bmake/mk/sys/AIX.mk
@@ -72,8 +72,6 @@ PFLAGS=
COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL= sh
-
YACC= yacc
YFLAGS= -d
YACC.y= ${YACC} ${YFLAGS}
diff --git a/contrib/bmake/mk/sys/Darwin.mk b/contrib/bmake/mk/sys/Darwin.mk
index c6beb72aeb27..6d37127be13f 100644
--- a/contrib/bmake/mk/sys/Darwin.mk
+++ b/contrib/bmake/mk/sys/Darwin.mk
@@ -4,7 +4,7 @@
OS= Darwin
unix?= We run ${OS}.
-.SUFFIXES: .out .a .ln .o .s .S .c ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h
+.SUFFIXES: .out .a .ln .o .s .S .c .m ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h
.SUFFIXES: .sh .m4 .dylib
.LIBS: .a .dylib
@@ -24,10 +24,15 @@ LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c
LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-.if exists(/usr/bin/gcc)
-CC?= gcc -pipe
+PIPE?= -pipe
+
+.if exists(/usr/bin/clang)
+CC?= cc ${PIPE}
+CXX?= c++
+.elif exists(/usr/bin/gcc)
+CC?= gcc ${PIPE}
.else
-CC?= cc -pipe
+CC?= cc ${PIPE}
.endif
DBG?= -O2
CFLAGS?= ${DBG}
@@ -52,7 +57,7 @@ CPP?= cpp
NOLINT= 1
CPPFLAGS?=
-MK_DEP?= mkdeps.sh -N
+MK_DEP?= mkdep
FC?= f77
FFLAGS?= -O
@@ -91,8 +96,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
TSORT?= tsort -q
@@ -121,6 +124,16 @@ ${CXX_SUFFIXES:%=%.a}:
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
+# Objective-C
+.m:
+ ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.m.o:
+ ${COMPILE.m} ${.IMPSRC}
+.m.a:
+ ${COMPILE.m} ${.IMPSRC}
+ ${AR} ${ARFLAGS} $@ $*.o
+ rm -f $*.o
+
# Fortran/Ratfor
.f:
${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
diff --git a/contrib/bmake/mk/sys/Generic.mk b/contrib/bmake/mk/sys/Generic.mk
index 9e3e6a7bc760..aa92a6246411 100644
--- a/contrib/bmake/mk/sys/Generic.mk
+++ b/contrib/bmake/mk/sys/Generic.mk
@@ -1,4 +1,4 @@
-# $Id: Generic.mk,v 1.13 2017/05/05 18:02:16 sjg Exp $
+# $Id: Generic.mk,v 1.14 2020/04/17 21:08:17 sjg Exp $
#
# some reasonable defaults
@@ -87,8 +87,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
YACC?= yacc
diff --git a/contrib/bmake/mk/sys/HP-UX.mk b/contrib/bmake/mk/sys/HP-UX.mk
index 29157b9f336c..ac5ce37b85fc 100644
--- a/contrib/bmake/mk/sys/HP-UX.mk
+++ b/contrib/bmake/mk/sys/HP-UX.mk
@@ -1,4 +1,4 @@
-# $Id: HP-UX.mk,v 1.11 2017/05/05 18:02:16 sjg Exp $
+# $Id: HP-UX.mk,v 1.12 2020/04/17 21:08:17 sjg Exp $
# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -108,7 +108,7 @@ LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
# HP's sh sucks
ENV=
-SHELL= /bin/ksh
+MAKE_SHELL= /bin/ksh
.if exists(/usr/local/bin/bison)
YACC= bison -y
diff --git a/contrib/bmake/mk/sys/IRIX.mk b/contrib/bmake/mk/sys/IRIX.mk
index 3d2236b084e3..b448fb5720cf 100644
--- a/contrib/bmake/mk/sys/IRIX.mk
+++ b/contrib/bmake/mk/sys/IRIX.mk
@@ -77,8 +77,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
TSORT?= tsort -q
diff --git a/contrib/bmake/mk/sys/Linux.mk b/contrib/bmake/mk/sys/Linux.mk
index 090de3ae2e2f..978aec098ca3 100644
--- a/contrib/bmake/mk/sys/Linux.mk
+++ b/contrib/bmake/mk/sys/Linux.mk
@@ -1,4 +1,4 @@
-# $Id: Linux.mk,v 1.9 2017/05/05 18:02:16 sjg Exp $
+# $Id: Linux.mk,v 1.10 2020/04/17 21:08:17 sjg Exp $
# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -75,8 +75,6 @@ PFLAGS=
COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL= sh
-
YACC= yacc
YFLAGS= -d
YACC.y= ${YACC} ${YFLAGS}
diff --git a/contrib/bmake/mk/sys/NetBSD.mk b/contrib/bmake/mk/sys/NetBSD.mk
index 00ea9a6ed445..a1711a5ec9db 100644
--- a/contrib/bmake/mk/sys/NetBSD.mk
+++ b/contrib/bmake/mk/sys/NetBSD.mk
@@ -112,8 +112,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
TSORT?= tsort -q
diff --git a/contrib/bmake/mk/sys/OSF1.mk b/contrib/bmake/mk/sys/OSF1.mk
index 1b4515a6fee0..0d0a73f40c98 100644
--- a/contrib/bmake/mk/sys/OSF1.mk
+++ b/contrib/bmake/mk/sys/OSF1.mk
@@ -1,4 +1,4 @@
-# $Id: OSF1.mk,v 1.8 2017/05/05 18:02:16 sjg Exp $
+# $Id: OSF1.mk,v 1.9 2020/04/17 21:08:17 sjg Exp $
# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -82,8 +82,6 @@ PFLAGS=
COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL= sh
-
.if exists(/usr/local/bin/bison) || exists(/opt/gnu/bin/bison)
YACC= bison -y
.else
diff --git a/contrib/bmake/mk/sys/OpenBSD.mk b/contrib/bmake/mk/sys/OpenBSD.mk
index a570c1cb9b8c..8b87ef3e85a4 100644
--- a/contrib/bmake/mk/sys/OpenBSD.mk
+++ b/contrib/bmake/mk/sys/OpenBSD.mk
@@ -87,8 +87,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
TSORT?= tsort -q
diff --git a/contrib/bmake/mk/sys/SunOS.mk b/contrib/bmake/mk/sys/SunOS.mk
index 2fb5128ab7d8..71c985204fc6 100644
--- a/contrib/bmake/mk/sys/SunOS.mk
+++ b/contrib/bmake/mk/sys/SunOS.mk
@@ -1,4 +1,4 @@
-# $Id: SunOS.mk,v 1.8 2017/05/05 18:02:17 sjg Exp $
+# $Id: SunOS.mk,v 1.9 2020/04/17 21:08:17 sjg Exp $
.if ${.PARSEFILE} == "sys.mk"
.include <host-target.mk>
@@ -103,8 +103,6 @@ PFLAGS=
COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL= sh
-
.if exists(/usr/local/bin/bison) || exists(/opt/gnu/bin/bison)
YACC= bison -y
.else
diff --git a/contrib/bmake/mk/sys/UnixWare.mk b/contrib/bmake/mk/sys/UnixWare.mk
index d65ca01fa2a7..3b1e531515df 100644
--- a/contrib/bmake/mk/sys/UnixWare.mk
+++ b/contrib/bmake/mk/sys/UnixWare.mk
@@ -1,4 +1,4 @@
-# $Id: UnixWare.mk,v 1.3 2017/05/05 18:02:17 sjg Exp $
+# $Id: UnixWare.mk,v 1.4 2020/04/17 21:08:17 sjg Exp $
# based on "Id: SunOS.5.sys.mk,v 1.6 2003/09/30 16:42:23 sjg Exp "
# $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -121,8 +121,6 @@ PFLAGS?=
COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-SHELL?= sh
-
SIZE?= size
TSORT?= tsort