diff options
Diffstat (limited to 'share')
| -rw-r--r-- | share/examples/tests/Makefile.depend | 11 | ||||
| -rw-r--r-- | share/examples/tests/tests/Makefile.depend | 11 | ||||
| -rw-r--r-- | share/examples/tests/tests/atf/Makefile.depend | 19 | ||||
| -rw-r--r-- | share/examples/tests/tests/plain/Makefile.depend | 18 | ||||
| -rw-r--r-- | share/man/man4/filemon.4 | 18 | ||||
| -rw-r--r-- | share/man/man5/resolver.5 | 3 | ||||
| -rw-r--r-- | share/man/man9/bus_adjust_resource.9 | 5 | ||||
| -rw-r--r-- | share/man/man9/bus_alloc_resource.9 | 6 | ||||
| -rw-r--r-- | share/mk/bsd.confs.mk | 6 | ||||
| -rw-r--r-- | share/mk/bsd.files.mk | 6 | ||||
| -rw-r--r-- | share/mk/bsd.incs.mk | 6 | ||||
| -rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.progs.mk | 41 | ||||
| -rw-r--r-- | share/mk/bsd.sys.mk | 2 | ||||
| -rw-r--r-- | share/mk/bsd.test.mk | 4 | ||||
| -rw-r--r-- | share/mk/local.dirdeps.mk | 61 | ||||
| -rw-r--r-- | share/mk/local.meta.sys.mk | 2 | ||||
| -rw-r--r-- | share/tests/Makefile.depend | 11 |
18 files changed, 172 insertions, 62 deletions
diff --git a/share/examples/tests/Makefile.depend b/share/examples/tests/Makefile.depend new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/share/examples/tests/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/share/examples/tests/tests/Makefile.depend b/share/examples/tests/tests/Makefile.depend new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/share/examples/tests/tests/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/share/examples/tests/tests/atf/Makefile.depend b/share/examples/tests/tests/atf/Makefile.depend new file mode 100644 index 000000000000..74074b9588ec --- /dev/null +++ b/share/examples/tests/tests/atf/Makefile.depend @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/atf/libatf-c \ + lib/libc \ + lib/libcompiler_rt \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/share/examples/tests/tests/plain/Makefile.depend b/share/examples/tests/tests/plain/Makefile.depend new file mode 100644 index 000000000000..3646e2e2b1af --- /dev/null +++ b/share/examples/tests/tests/plain/Makefile.depend @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index c0b4a51c5b4a..3287a47aab6a 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2016 +.Dd March 9, 2016 .Dt FILEMON 4 .Os .Sh NAME @@ -125,6 +125,19 @@ function returns the value 0 if successful; otherwise the value \-1 is returned and the global variable .Va errno is set to indicate the error. +.Sh ERRORS +The +.Fn ioctl +system call +with +.Dv FILEMON_SET_FD +will fail if: +.Bl -tag -width Er +.It Bq Er EEXIST +The +.Nm +handle is already associated with a file descriptor. +.El .Sh FILES .Bl -tag -width ".Pa /dev/filemon" .It Pa /dev/filemon @@ -194,3 +207,6 @@ Only children of the set process are logged. Processes can escape being traced by double forking. This is not seen as a problem as the intended use is build monitoring, which does not make sense to have daemons for. +.Pp +Unloading the module may panic the system, thus requires using +.Ic kldunload -f . diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5 index a3c5e05cf7bd..8306309b831e 100644 --- a/share/man/man5/resolver.5 +++ b/share/man/man5/resolver.5 @@ -218,7 +218,8 @@ resides in .Sh SEE ALSO .Xr gethostbyname 3 , .Xr resolver 3 , -.Xr hostname 7 +.Xr hostname 7 , +.Xr resolvconf 8 .Rs .%T "Name Server Operations Guide for BIND" .Re diff --git a/share/man/man9/bus_adjust_resource.9 b/share/man/man9/bus_adjust_resource.9 index 6f561b938f37..681faf61ebb4 100644 --- a/share/man/man9/bus_adjust_resource.9 +++ b/share/man/man9/bus_adjust_resource.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2011 +.Dd March 10, 2016 .Dt BUS_ADJUST_RESOURCE 9 .Os .Sh NAME @@ -41,8 +41,7 @@ .In sys/rman.h .In machine/resource.h .Ft int -.Fo bus_adjust_resource -.Fa "device_t dev" "int type" "struct resource *r" "rman_res_t start" "rman_res_t end" +.Fn bus_adjust_resource "device_t dev" "int type" "struct resource *r" "rman_res_t start" "rman_res_t end" .Sh DESCRIPTION This function is used to ask the parent bus to adjust the resource range assigned to an allocated resource. diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9 index 92c589d6f81a..c8418b0a3953 100644 --- a/share/man/man9/bus_alloc_resource.9 +++ b/share/man/man9/bus_alloc_resource.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2000 +.Dd March 10, 2016 .Dt BUS_ALLOC_RESOURCE 9 .Os .Sh NAME @@ -50,10 +50,8 @@ .Fc .Ft struct resource * .Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags" -.Fc .Ft struct resource * -.Fn bus_alloc_resource_anywhere -.Fa "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags" +.Fn bus_alloc_resource_anywhere "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags" .Sh DESCRIPTION This is an easy interface to the resource-management functions. It hides the indirection through the parent's method table. diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index 20a97824fdfd..6fe2ad29bb4b 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -6,8 +6,10 @@ CONFGROUPS?= CONFS +_CONFGROUPS= ${CONFGROUPS:C,[/*],_,g} + .if !target(buildconfig) -.for group in ${CONFGROUPS} +.for group in ${_CONFGROUPS} buildconfig: ${${group}} .endfor .endif @@ -17,7 +19,7 @@ all: buildconfig .endif .if !target(installconfig) -.for group in ${CONFGROUPS} +.for group in ${_CONFGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${SHAREOWN} diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk index 4080eddc2c0d..d4fd5095c0d4 100644 --- a/share/mk/bsd.files.mk +++ b/share/mk/bsd.files.mk @@ -9,7 +9,9 @@ __<bsd.files.mk>__: FILESGROUPS?= FILES -.for group in ${FILESGROUPS} +_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g} + +.for group in ${_FILESGROUPS} # Add in foo.yes and remove duplicates from all the groups ${${group}}:= ${${group}} ${${group}.yes} ${${group}}:= ${${group}:O:u} @@ -20,7 +22,7 @@ buildfiles: ${${group}} all: buildfiles .endif -.for group in ${FILESGROUPS} +.for group in ${_FILESGROUPS} .if defined(${group}) && !empty(${group}) installfiles: installfiles-${group} diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk index cd3e58327356..c5c852ac5a15 100644 --- a/share/mk/bsd.incs.mk +++ b/share/mk/bsd.incs.mk @@ -8,6 +8,8 @@ INCSGROUPS?= INCS +_INCSGROUPS= ${INCSGROUPS:C,[/*],_,g} + .if defined(NO_ROOT) .if !defined(TAGS) || ! ${TAGS:Mpackage=*} TAGS+= package=${PACKAGE:Uruntime} @@ -16,7 +18,7 @@ TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} .endif .if !target(buildincludes) -.for group in ${INCSGROUPS} +.for group in ${_INCSGROUPS} buildincludes: ${${group}} .endfor .endif @@ -26,7 +28,7 @@ all: buildincludes .endif .if !target(installincludes) -.for group in ${INCSGROUPS} +.for group in ${_INCSGROUPS} .if defined(${group}) && !empty(${group}) ${group}OWN?= ${BINOWN} diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index c5118564f06c..29a95e5a7df1 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -453,12 +453,13 @@ OBJS_DEPEND_GUESS.${_S:R}.So= ${_S} .include <bsd.dep.mk> -.if defined(LIB) && !empty(LIB) .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +.if defined(LIB) && !empty(LIB) ${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} .for _S in ${SRCS:N*.[hly]} ${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} .endfor +.endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) ${SOBJS}: ${OBJS_DEPEND_GUESS} @@ -467,7 +468,6 @@ ${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So} .endfor .endif .endif -.endif .include <bsd.clang-analyze.mk> .include <bsd.obj.mk> diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 7560e7ffc5b7..c5639b410128 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -20,13 +20,6 @@ # we really only use PROGS below... PROGS += ${PROGS_CXX} -# In meta mode, we can capture dependenices for _one_ of the progs. -# if makefile doesn't nominate one, we use the first. -.ifndef UPDATE_DEPENDFILE_PROG -UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} -.export UPDATE_DEPENDFILE_PROG -.endif - .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ @@ -45,11 +38,20 @@ $v ?= .endif .endfor -# for meta mode, there can be only one! -.if ${PROG} == ${UPDATE_DEPENDFILE_PROG} -UPDATE_DEPENDFILE ?= yes +.if ${MK_DIRDEPS_BUILD} == "yes" +# Leave updating the Makefile.depend to the parent. +UPDATE_DEPENDFILE = NO + +# Record our meta files for the parent to use. +CLEANFILES+= ${PROG}.meta_files +${PROG}.meta_files: .NOMETA $${.MAKE.META.CREATED} ${_this} + @echo "Updating ${.TARGET}: ${.OODATE:T:[1..8]}" + @echo ${.MAKE.META.FILES} > ${.TARGET} + +.if !defined(_SKIP_BUILD) +.END: ${PROG}.meta_files .endif -UPDATE_DEPENDFILE ?= NO +.endif # ${MK_DIRDEPS_BUILD} == "yes" # prog.mk will do the rest .else # !defined(PROG) @@ -57,14 +59,17 @@ UPDATE_DEPENDFILE ?= NO all: ${PROGS} .endif -# We cannot capture dependencies for meta mode here -UPDATE_DEPENDFILE = NO +META_XTRAS+= ${cat ${PROGS:S/$/*.meta_files/} 2>/dev/null || true:L:sh} -.if ${MK_STAGING} != "no" -.if !empty(PROGS) -stage_files.prog: ${PROGS} -.endif -.endif # ${MK_STAGING} != "no" +.if ${MK_STAGING} != "no" && !empty(PROGS) +# Stage from parent while respecting PROGNAME and BINDIR overrides. +.for _prog in ${PROGS} +STAGE_DIR.prog.${_prog}= ${STAGE_OBJTOP}${BINDIR.${_prog}:UBINDIR_${_prog}:U${BINDIR}} +STAGE_AS_SETS+= prog.${_prog} +STAGE_AS_prog.${_prog}= ${PROGNAME.${_prog}:UPROGNAME_${_prog}:U${_prog}} +stage_as.prog.${_prog}: ${_prog} +.endfor +.endif # ${MK_STAGING} != "no" && !empty(PROGS) .endif .endif # PROGS || PROGS_CXX diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 4a59274fdfe3..be4c52fe471f 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -208,7 +208,7 @@ staging: beforeinstall .if ${MK_STAGING_PROG} != "no" && !defined(INTERNALPROG) STAGE_DIR.prog= ${STAGE_OBJTOP}${BINDIR} -.if !empty(PROG) || !empty(PROGS) +.if !empty(PROG) .if defined(PROGNAME) STAGE_AS_SETS+= prog STAGE_AS_${PROG}= ${PROGNAME} diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index d697097f25a7..97240ccbd11e 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -77,10 +77,6 @@ SUBDIR_PARALLEL= t MAN= .endif -# tell progs.mk we might want to install things -PROG_VARS+= BINDIR -PROGS_TARGETS+= install - .if !defined(NOT_FOR_TEST_SUITE) .include <suite.test.mk> .endif diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index ba800a4cc909..af7cf77041cb 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -90,7 +90,8 @@ DIRDEPS += \ # used will be added in and handled via [local.]gendirdeps.mk. This is not # done for MACHINE=host builds. # XXX: Include this in local.autodep.mk as well for gendirdeps without filemon. -.if ${RELDIR} == ${DEP_RELDIR} # Only do this for main build target +# Only do this for main build target +.if ${RELDIR} == ${DEP_RELDIR} && !defined(_RECURSING_PROGS) .for _depfile in ${.MAKE.DEPENDFILE_PREFERENCE:T} .if !defined(_have_depfile) && exists(${.CURDIR}/${_depfile}) _have_depfile= @@ -99,6 +100,35 @@ _have_depfile= .if !defined(_have_depfile) # KMOD does not use any stdlibs. .if !defined(KMOD) +# Gather PROGS dependencies first +.if !empty(PROGS) +_PROGS_LIBADD= +_PROGS_DPADD= +_PROGS_SRCS= +.for _prog in ${PROGS} +.for s in . _ +.if !empty(LIBADD${s}${_prog}) +_PROGS_LIBADD+= ${LIBADD${s}${_prog}} +.endif +.if !empty(DPADD${s}${_prog}) +_PROGS_DPADD+= ${DPADD${s}${_prog}} +.endif +.if !empty(SRCS${s}${_prog}) +_PROGS_SRCS+= ${SRCS${s}${_prog}} +.endif +.endfor # .for s in . _ +# Add in assumed source (bsd.prog.mk) +.if !target(${_prog}) +.if defined(PROG_CXX) +_PROGS_SRCS+= ${_prog}.cc +.else +_PROGS_SRCS+= ${_prog}.c +.endif +.endif # !target(${_prog}) +.endfor # .for _prog in ${PROGS} +.endif # !empty(PROGS) +_SRCS= ${SRCS} ${_PROGS_SRCS} + # Has C files. The C_DIRDEPS are shared with C++ files as well. C_DIRDEPS= \ gnu/lib/csu \ @@ -118,12 +148,12 @@ C_DIRDEPS= \ C_DIRDEPS+= include/gssapi .endif -.if !empty(SRCS:M*.c) +.if !empty(_SRCS:M*.c) DIRDEPS+= ${C_DIRDEPS} .endif # Has C++ files -.if !empty(SRCS:M*.cc) || !empty(SRCS:M*.C) || !empty(SRCS:M*.cpp) || \ - !empty(SRCS:M*.cxx) +.if !empty(_SRCS:M*.cc) || !empty(_SRCS:M*.C) || !empty(_SRCS:M*.cpp) || \ + !empty(_SRCS:M*.cxx) DIRDEPS+= ${C_DIRDEPS} .if ${MK_CLANG} == "yes" DIRDEPS+= lib/libc++ lib/libcxxrt @@ -135,28 +165,15 @@ DIRDEPS+= lib/msun .endif # CXX .endif # !defined(KMOD) # Has yacc files. -.if !empty(SRCS:M*.y) +.if !empty(_SRCS:M*.y) DIRDEPS+= usr.bin/yacc.host .endif -# Gather PROGS dependencies -.if !empty(PROGS) -_PROGS_LIBADD= -_PROGS_DPADD= -.for _prog in ${PROGS} -.if !empty(LIBADD.${_prog}) -_PROGS_LIBADD+= ${LIBADD.${_prog}} -.endif -.if !empty(DPADD.${_prog}) -_PROGS_DPADD+= ${DPADD.${_prog}} -.endif -.endfor -.endif # !empty(PROGS) -.if !empty(DPADD) +_DPADD= ${DPADD} ${_PROGS_DPADD} +.if !empty(_DPADD) # Taken from meta.autodep.mk (where it only does something with # BUILD_AT_LEVEL0, which we don't use). # This only works for DPADD with full OBJ/SRC paths, which is mostly just # _INTERNALLIBS. -_DPADD= ${DPADD} ${_PROGS_DPADD} _DP_DIRDEPS= \ ${_DPADD:O:u:M${OBJTOP}*:H:N.:tA:C,${OBJTOP}[^/]*/,,:N.:O:u} \ ${_DPADD:O:u:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} @@ -165,9 +182,9 @@ _DP_DIRDEPS= \ DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,:tA:C,^${SRCTOP}/,,} .endif .endif # !empty(DPADD) -.if !empty(LIBADD) -# Also handle LIBADD for non-internal libraries. _ALL_LIBADD= ${LIBADD} ${_PROGS_LIBADD} +.if !empty(_ALL_LIBADD) +# Also handle LIBADD for non-internal libraries. .for _lib in ${_ALL_LIBADD:O:u} _lib${_lib}reldir= ${LIB${_lib:tu}DIR:C,${OBJTOP}/,,} .if defined(LIB${_lib:tu}DIR) && ${DIRDEPS:M${_lib${_lib}reldir}} == "" && \ diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index bf4fcbc0b004..9f000f58b803 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -205,7 +205,9 @@ CSU_DIR := ${CSU_DIR.${MACHINE_ARCH}} .if !empty(TIME_STAMP) TRACER= ${TIME_STAMP} ${:U} .endif +.if !defined(_RECURSING_PROGS) WITH_META_STATS= t +.endif # toolchains can be a pain - especially bootstrappping them .if ${MACHINE} == "host" diff --git a/share/tests/Makefile.depend b/share/tests/Makefile.depend new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/share/tests/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif |
