From owner-dev-commits-src-main@freebsd.org Tue Mar 16 07:12:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59E8C579C91; Tue, 16 Mar 2021 07:12:24 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F04HC6Dlhz3NgR; Tue, 16 Mar 2021 07:12:23 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1615878735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GlekNwgD7uv5TyJVnItGZl5P8UZUIPPiNduSlvkIB7s=; b=qvGYJyPjdXhlZ5Q9MnIy7X/LrCBoApbqqmBECeCa9OdhqaNA23EWUKhBsaAl5tLLiVErGu BN7Bshcb9l0DOhSfMo5wDVztkHbYDwIYv5DRs4+X4rRPy7id4J8xg7GxgAvP/t8Ka9x1kf Oosw1GiKCBsAW43YQ+sXC1HZ0AvC3Lo= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id de9d1ed8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 16 Mar 2021 07:12:15 +0000 (UTC) Date: Tue, 16 Mar 2021 08:12:14 +0100 From: Emmanuel Vadot To: Konstantin Belousov Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0006530aa14b - main - include: Remove symlink installation Message-Id: <20210316081214.0ba83981a37b8b3b9e5589bd@bidouilliste.com> In-Reply-To: References: <202103160613.12G6DLYL061995@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4F04HC6Dlhz3NgR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 07:12:24 -0000 On Tue, 16 Mar 2021 08:52:07 +0200 Konstantin Belousov wrote: > On Tue, Mar 16, 2021 at 06:13:21AM +0000, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0006530aa14b9df56f88df7d819fae89b115d865 > > > > commit 0006530aa14b9df56f88df7d819fae89b115d865 > > Author: Emmanuel Vadot > > AuthorDate: 2021-03-16 06:12:53 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2021-03-16 06:12:53 +0000 > > > > include: Remove symlink installation > > > > headers could be installed as symlink to the source tree instead of copies. > > Remove the possibility to do that. > > This make the makefile easier to read and to maintain and also don't duplicate > > code. > > > > While here remove some directories from LSBUDIRS as we already install them using > > the INCS stuff. > > This might make Makefiles easier to read, but also it makes practically > very hard to develop rtld/libc/libthr. After any system header > modification, full buildworld or at least kernel-toolchain run is > required to get buildenv populated with the new headers. Can you share what you did before so I can cook a patch that restore this behavior in a better way than it was done before ? Thanks, > > > > Reviewed by: bapt > > Differential Revision: https://reviews.freebsd.org/D29167 > > MFC after: 2 weeks > > --- > > include/Makefile | 117 +++++-------------------------------------------------- > > 1 file changed, 9 insertions(+), 108 deletions(-) > > > > diff --git a/include/Makefile b/include/Makefile > > index d47879e11c93..e0df8571ae73 100644 > > --- a/include/Makefile > > +++ b/include/Makefile > > @@ -41,11 +41,11 @@ LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ > > LDIRS= geom net net80211 netgraph netinet netinet6 \ > > netipsec netsmb nfs nfsclient nfsserver sys vm > > > > -LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ > > - dev/hwpmc dev/hyperv \ > > - dev/ic dev/iicbus dev/if_wg dev/io dev/mfi dev/mmc dev/nvme \ > > - dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ > > - dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd \ > > +LSUBDIRS= dev/an dev/ciss dev/filemon dev/firewire \ > > + dev/hwpmc \ > > + dev/ic dev/iicbus if_wg dev/io dev/mfi dev/mmc dev/nvme \ > > + dev/ofw dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/pwm \ > > + dev/smbus dev/speaker dev/tcp_log dev/vkbd \ > > fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \ > > fs/procfs fs/smbfs fs/udf fs/unionfs \ > > geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ > > @@ -295,13 +295,6 @@ LSUBDIRS+= dev/usb > > _dev_powermac_nvram= dev/powermac_nvram > > .endif > > > > -# Define SHARED to indicate whether you want symbolic links to the system > > -# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is > > -# probably only useful for developers and should be avoided if you do not > > -# wish to tie your /usr/include and /usr/src together. > > -#SHARED= symlinks > > -SHARED?= copies > > - > > INCS+= osreldate.h > > > > SYSDIR= ${SRCTOP}/sys > > @@ -332,25 +325,23 @@ _MARCHS= ${MACHINE_CPUARCH} > > _MARCHS+= x86 > > .endif > > > > -META_TARGETS+= compat > > -stage_includes: ${SHARED} > > +stage_includes: _installincludes > > SDESTDIR= ${SYSROOT:U${DESTDIR}} > > > > +_installincludes: > > # Take care of stale directory-level symlinks. > > # Note: The "|| true" after find is needed in case one of the directories does > > # not exist (yet). > > -compat: > > cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ > > crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true > > mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ > > -f ${SRCTOP}/etc/mtree/BSD.include.dist \ > > -p ${SDESTDIR}${INCLUDEDIR} > /dev/null > > > > -copies: .PHONY .META > > cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ > > machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ > > -name "*.h" -print -delete || true > > -.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} > > +.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} > > cd ${SRCTOP}/sys; \ > > ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ > > ${SDESTDIR}${INCLUDEDIR}/$i > > @@ -380,99 +371,9 @@ copies: .PHONY .META > > .endif > > .endfor > > > > -symlinks: .PHONY .META > > - @${ECHO} "Setting up symlinks to kernel source tree..." > > -.for i in ${LDIRS} > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i > > -.endfor > > -.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec} > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i > > -.endfor > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../sys/dev/acpica/%s ' acpiio.h acpi_hpet.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/acpica; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/agp/agpreg.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../sys/dev/evdev/%s ' input.h input-event-codes.h uinput.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/evdev; > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../sys/dev/hid/%s ' hid.h hidraw.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/hid; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/include/hyperv.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/hyperv/utilities/hv_snapshot.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/hyperv; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/pci/pcireg.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/pci; \ > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/veriexec/veriexec_ioctl.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/veriexec; > > -.for i in ${LSUBSUBDIRS} > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../../%s ' sys/$i/*.h) ${SDESTDIR}${INCLUDEDIR}/$i > > -.endfor > > -.if ${MK_IPFILTER} != "no" > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../%s ' sys/contrib/ipfilter/netinet/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/netinet; > > -.endif > > -.if ${MK_PF} != "no" > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../%s ' sys/netpfil/pf/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/netpfil/pf; > > -.endif > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../sys/crypto/rijndael/rijndael.h \ > > - ${SDESTDIR}${INCLUDEDIR}/crypto; \ > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../%s ' sys/opencrypto/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/crypto; \ > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../%s ' sys/${MACHINE}/include/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/machine; > > -.if exists(${SRCTOP}/sys/${MACHINE}/include/pc) > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../%s ' sys/${MACHINE}/include/pc/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/machine/pc; > > -.endif > > -.for _MARCH in ${_MARCHS} > > -.if exists(${SRCTOP}/sys/${_MARCH}/include) > > - ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ > > - ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; \ > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../%s ' sys/${_MARCH}/include/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/${_MARCH}; > > -.if exists(${SRCTOP}/sys/${_MARCH}/include/pc) > > - ${INSTALL} -d ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 755 \ > > - ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../%s ' sys/${_MARCH}/include/pc/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/${_MARCH}/pc; > > -.endif > > -.endif > > -.endfor > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../../%s ' sys/fs/cd9660/*.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/isofs/cd9660; \ > > - cd ${SRCTOP}; ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - $$(printf '../../../sys/rpc/%s ' rpcsec_tls.h types.h) \ > > - ${SDESTDIR}${INCLUDEDIR}/rpc; > > - cd ${SRCTOP}/sys/rpc; > > -.if ${MK_CDDL} != "no" > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} \ > > - ../../../sys/contrib/openzfs/include/sys/nvpair.h \ > > - ${SDESTDIR}${INCLUDEDIR}/sys > > -.endif > > -.if ${MK_MLX5TOOL} != "no" > > - ${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},dev} ../../../../sys/dev/mlx5/mlx5io.h \ > > - ${SDESTDIR}${INCLUDEDIR}/dev/mlx5 > > -.endif > > - > > .include > > > > -installincludes: ${SHARED} > > -${SHARED}: compat > > +installincludes: _installincludes > > > > .if ${MACHINE} == "host" && !defined(_SKIP_BUILD) > > # we're here because we are building a sysroot... -- Emmanuel Vadot