Index: head/lib/libmagic/Makefile =================================================================== --- head/lib/libmagic/Makefile (revision 355903) +++ head/lib/libmagic/Makefile (revision 355904) @@ -1,72 +1,74 @@ # $FreeBSD$ # Copyright (c) David E. O'Brien, 2000-2004, 2006, 2009 PACKAGE=lib${LIB} CONTRDIR= ${SRCTOP}/contrib/file .PATH: ${CONTRDIR}/src .PATH: ${CONTRDIR}/doc LIB= magic SHLIB_MAJOR= 4 .if !make(build-tools) LIBADD= z .endif MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c \ compress.c der.c encoding.c fsmagic.c funcs.c is_json.c \ is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c INCS= magic.h MAGICPATH?= /usr/share/misc CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H CFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${CONTRDIR}/src WARNS?= 3 CLEANFILES+= magic magic.mgc FILES= magic magic.mgc FILESDIR= ${MAGICPATH} MAGFILES= ${CONTRDIR}/magic/Header \ ${CONTRDIR}/magic/Localstuff \ ${CONTRDIR}/magic/Magdir/[a-z]* magic: ${MAGFILES} cat ${.ALLSRC:O} > ${.TARGET} -magic.mgc: mkmagic magic +magic.mgc: magic ${BTOOLSPATH:U.}/mkmagic magic .if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" CLEANFILES+= mkmagic DEPENDOBJS+= mkmagic build-tools: mkmagic mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META} ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \ ${.ALLSRC:N*.h:O:u} ${LDADD} .endif .if ${MK_DIRDEPS_BUILD} == "yes" BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR} +.else +magic.mgc: mkmagic .endif FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h CLEANFILES+= ${MAN} .for mp in ${MAN} ${mp}: ${mp:C/[0-9]/man/} sed -e 's/__FSECTION__/5/g' -e 's/__CSECTION__/1/g' \ -e 's/__VERSION__/${FILEVER}/g' \ -e 's,__MAGIC__,${MAGICPATH}/magic,g' ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= ${INCS} .for inc in ${INCS} ${inc}: ${inc}.in sed -e 's,X.YY,${FILEVER:S,",,g:S,.,,g},g' ${.ALLSRC} > ${.TARGET} .endfor .include Index: head/lib/libpmc/Makefile =================================================================== --- head/lib/libpmc/Makefile (revision 355903) +++ head/lib/libpmc/Makefile (revision 355904) @@ -1,122 +1,122 @@ # $FreeBSD$ LIB= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h ALLOW_MIPS_SHARED_TEXTREL= .if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" .if ${MACHINE_ARCH} == "aarch64" EVENT_ARCH="arm64" .elif ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" EVENT_ARCH="x86" .elif ${MACHINE_ARCH} == "powerpc" EVENT_ARCH="powerpc" .endif .if ${MK_DIRDEPS_BUILD} == "yes" # avoid circular dependency -CFLAGS+= -I${RELDIR:H}/libpmcstat +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents .else JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents # This file is built in a subdirectory so never try to rebuild it here. ${JEVENTS}: .PHONY .if make(*clean*) SUBDIR+= pmu-events .endif .endif libpmc_events.c: ${JEVENTS} ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c SRCS+= libpmc_events.c .endif WARNS?= 3 CFLAGS+= -I${.CURDIR} CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align # Silence warnings about usage of deprecated std::auto_ptr CXXWARNFLAGS+= -Wno-deprecated-declarations MAN= pmc.3 MAN+= pmc_allocate.3 MAN+= pmc_attach.3 MAN+= pmc_capabilities.3 MAN+= pmc_configure_logfile.3 MAN+= pmc_disable.3 MAN+= pmc_event_names_of_class.3 MAN+= pmc_get_driver_stats.3 MAN+= pmc_get_msr.3 MAN+= pmc_init.3 MAN+= pmc_name_of_capability.3 MAN+= pmc_read.3 MAN+= pmc_set.3 MAN+= pmc_start.3 MAN+= pmclog.3 MAN+= pmc.soft.3 # PMC-dependent manual pages MAN+= pmc.atom.3 MAN+= pmc.atomsilvermont.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.corei7.3 MAN+= pmc.corei7uc.3 MAN+= pmc.haswell.3 MAN+= pmc.haswelluc.3 MAN+= pmc.haswellxeon.3 MAN+= pmc.iaf.3 MAN+= pmc.ivybridge.3 MAN+= pmc.ivybridgexeon.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.mips24k.3 MAN+= pmc.octeon.3 MAN+= pmc.p4.3 MAN+= pmc.p5.3 MAN+= pmc.p6.3 MAN+= pmc.sandybridge.3 MAN+= pmc.sandybridgeuc.3 MAN+= pmc.sandybridgexeon.3 MAN+= pmc.tsc.3 MAN+= pmc.ucf.3 MAN+= pmc.westmere.3 MAN+= pmc.westmereuc.3 MAN+= pmc.xscale.3 MLINKS+= \ pmc_allocate.3 pmc_release.3 \ pmc_attach.3 pmc_detach.3 \ pmc_capabilities.3 pmc_ncpu.3 \ pmc_capabilities.3 pmc_npmc.3 \ pmc_capabilities.3 pmc_pmcinfo.3 \ pmc_capabilities.3 pmc_cpuinfo.3 \ pmc_capabilities.3 pmc_width.3 \ pmc_configure_logfile.3 pmc_flush_logfile.3 \ pmc_configure_logfile.3 pmc_writelog.3 \ pmc_disable.3 pmc_enable.3 \ pmc_name_of_capability.3 pmc_name_of_class.3 \ pmc_name_of_capability.3 pmc_name_of_cputype.3 \ pmc_name_of_capability.3 pmc_name_of_disposition.3 \ pmc_name_of_capability.3 pmc_name_of_event.3 \ pmc_name_of_capability.3 pmc_name_of_mode.3 \ pmc_name_of_capability.3 pmc_name_of_state.3 \ pmc_read.3 pmc_rw.3 \ pmc_read.3 pmc_write.3 \ pmc_start.3 pmc_stop.3 MLINKS+= \ pmclog.3 pmclog_open.3 \ pmclog.3 pmclog_close.3 \ pmclog.3 pmclog_feed.3 \ pmclog.3 pmclog_read.3 .include Index: head/share/mk/local.dirdeps.mk =================================================================== --- head/share/mk/local.dirdeps.mk (revision 355903) +++ head/share/mk/local.dirdeps.mk (revision 355904) @@ -1,233 +1,233 @@ # $FreeBSD$ .if !target(_DIRDEP_USE) # we are the 1st makefile .if !defined(MK_CLANG) .include "${SRCTOP}/share/mk/src.opts.mk" .endif # making universe is special .if defined(UNIVERSE_GUARD) # these should be done by now DIRDEPS_FILTER+= N*.host .endif # pseudo machines get no qualification .for m in host common M_dep_qual_fixes += C;($m),[^/.,]*$$;\1; .endfor #.info M_dep_qual_fixes=${M_dep_qual_fixes} # Cheat for including src.libnames.mk ____: # Pull in _INTERNALLIBS .include # Host libraries should mostly be excluded from the build so the # host version in /usr/lib is used. Internal libraries need to be # allowed to be built though since they are never installed. _need_host_libs= .for lib in ${_INTERNALLIBS} _need_host_libs+= ${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor N_host_libs:= ${cd ${SRCTOP} && echo lib/lib*:L:sh:${_need_host_libs:${M_ListToSkip}}:${M_ListToSkip}} DIRDEPS_FILTER.host = \ ${N_host_libs} \ Ninclude* \ Nlib/csu* \ Nlib/libc \ Nlib/[mn]* \ Ngnu/lib/csu* \ Ngnu/lib/lib[a-r]* \ Nsecure/lib* \ Nusr.bin/xinstall* \ DIRDEPS_FILTER+= \ Nbin/cat.host \ ${DIRDEPS_FILTER.xtras:U} # Cleanup a buildworld's WORLDTMP so that any files generated from it # or using it will rebuild with the DIRDEPS SYSROOT. Otherwise existing # object .meta files may still reference those directories and not be # rebuilt and lead to incorrect Makefile.depend files due to lack of # .dirdep files. .if !defined(NO_CLEANUP_WORLDTMP) && exists(${OBJTOP}/tmp/_worldtmp) cleanup_worldtmp: .PHONY .NOMETA @echo "Cleaning leftover WORLDTMP from buildworld." -rm -rf ${OBJTOP}/tmp/* -chflags -R 0 ${OBJTOP}/tmp/* rm -rf ${OBJTOP}/tmp beforedirdeps: cleanup_worldtmp .endif .endif # reset this each time DIRDEPS_FILTER.xtras= .if ${DEP_MACHINE:Npkgs*} != "" DIRDEPS_FILTER.xtras+= Nusr.bin/clang/clang.host .endif .if ${DEP_MACHINE} != "host" # this is how we can handle optional dependencies .if ${DEP_RELDIR} == "lib/libc" DIRDEPS += lib/libc_nonshared .if ${MK_SSP:Uno} != "no" DIRDEPS += gnu/lib/libssp/libssp_nonshared .endif .else DIRDEPS_FILTER.xtras+= Nlib/libc_nonshared .endif # some optional things .if ${MK_CTF} == "yes" && ${DEP_RELDIR:Mcddl/usr.bin/ctf*} == "" DIRDEPS += \ cddl/usr.bin/ctfconvert.host \ cddl/usr.bin/ctfmerge.host .endif # Add in proper libgcc (gnu or LLVM) if not building libcc and libc is needed. # Add both gcc_s and gcc_eh as dependencies as the decision to build # -static or not is not known here. .if ${DEP_RELDIR:M*libgcc*} == "" && ${DIRDEPS:U:Mlib/libc} != "" .if ${MK_LLVM_LIBUNWIND} == "yes" DIRDEPS+= \ lib/libgcc_eh \ lib/libgcc_s .else DIRDEPS+= gnu/lib/libgcc .endif .endif # Bootstrap support. Give hints to DIRDEPS if there is no Makefile.depend* # generated yet. This can be based on things such as SRC files and LIBADD. # These hints will not factor into the final Makefile.depend as only what is # 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. # 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= .endif .endfor .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= \ include \ include/arpa \ include/protocols \ include/rpc \ include/rpcsvc \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ # libgcc is needed as well but is added later. .if ${MK_GSSAPI} != "no" C_DIRDEPS+= include/gssapi .endif .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) DIRDEPS+= ${C_DIRDEPS} .if ${MK_CLANG} == "yes" DIRDEPS+= lib/libc++ lib/libcxxrt .else DIRDEPS+= gnu/lib/libstdc++ gnu/lib/libsupc++ .endif # XXX: Clang and GCC always adds -lm currently, even when not needed. DIRDEPS+= lib/msun .endif # CXX .endif # !defined(KMOD) # Has yacc files. .if !empty(_SRCS:M*.y) DIRDEPS+= usr.bin/yacc.host .endif _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. _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} # Resolve the paths to RELDIRs .if !empty(_DP_DIRDEPS) DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,:tA:C,^${SRCTOP}/,,} .endif .endif # !empty(DPADD) _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}} == "" && \ exists(${SRCTOP}/${_lib${_lib}reldir}) DIRDEPS+= ${_lib${_lib}reldir} .endif .endfor .endif # !empty(LIBADD) .endif # no Makefile.depend* .endif # ${RELDIR} == ${DEP_RELDIR} .endif # ${DEP_MACHINE} != "host" .if ${MK_STAGING} == "yes" # we need targets/pseudo/stage to prep the stage tree .if ${DEP_RELDIR} != "targets/pseudo/stage" DIRDEPS += targets/pseudo/stage .endif .endif # this one is too pervasive -.if ${MK_BSD_CRTBEGIN} == "no" && ${DEP_RELDIR} != "gnu/lib/csu" +.if ${MK_BSD_CRTBEGIN} == "no" && ${DEP_RELDIR:N.:Ngnu/lib/csu:Ninclude*:Ntargets/*} != "" DIRDEPS+= gnu/lib/csu .endif DEP_MACHINE_ARCH = ${MACHINE_ARCH.${DEP_MACHINE}} CSU_DIR.${DEP_MACHINE_ARCH} ?= csu/${DEP_MACHINE_ARCH} CSU_DIR := ${CSU_DIR.${DEP_MACHINE_ARCH}} BOOT_MACHINE_DIR:= ${BOOT_MACHINE_DIR.${DEP_MACHINE}} KERNEL_NAME:= ${KERNEL_NAME.${DEP_MACHINE}}