From owner-freebsd-hackers@freebsd.org Tue Mar 7 04:50:43 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 290BFD0134D; Tue, 7 Mar 2017 04:50:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com [IPv6:2607:f8b0:400e:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDF66196D; Tue, 7 Mar 2017 04:50:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x233.google.com with SMTP id b129so74345421pgc.2; Mon, 06 Mar 2017 20:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:date:message-id:cc:to:mime-version; bh=a0gIyYotWW2r6nvEwp8wghdNGw5OGaAAi2ZFdZgrh8I=; b=hREQREAahi1sUU0hJKfTn1WeKAg7VktOYIjPG/WyWHwgIxTNFTgecJhlTNNTIpWXUz VPp4jGhxLWINCabNAmrouuiMW87HuF4aCZ7zzOngR3h0IoKooXeswqkY1yZ9+LHZmGOA A+3i8iTUEAq7Ta5p1fhHpbMBZqy69kyzXJKy6oRGUVEjMdD0c+84uHR5Gzb/8BPnMyOV akmD6Lr3k/yGTq97//8+YG7OrPQXXgt6L0LyhvY92kKLR93uvTIrWAhdxswNOKU9ixR0 RXWR/7v7PLowF+JCz5nrVAJa6vDA1ESUXTIcD1ZrpwlNjT0JxSvFpRGArR2tsmc6jeXk +oWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:date:message-id:cc:to:mime-version; bh=a0gIyYotWW2r6nvEwp8wghdNGw5OGaAAi2ZFdZgrh8I=; b=Lj+Lb3M3nYe8IuK945ma3camjAaw15uz2NmMjDPylFGdzk+z17MgSSjL1019YPccoS hmiGk3kh/sGUorQrW0Yj2bMOTlMFaOs7aZn8a2cfRac8Wr/hbBaseL6MUMxlCZZGNewN M8p/TDKCI9xpemdPT2ouoaGqpxixwgNGpf2JZ4p7mRZZwYzJFBrXDrqmgBGVMzVy4Nhe 4T84wcYctYEFEsOMxPPEUeZnMNe/APWdRFT0pmnPoCppvqArnlN3dhnqGn8/wC4e0idL QaUWiqFH0P6yfm0+LKT50MHrm0jl/DQTBUWAzq0EFTy8LhvCRl3V58oE8txcUxaDVTgV LfZw== X-Gm-Message-State: AMke39nSnqtiUtBOlnZxBvWdnNpBpjwUd6Zis1HyNOklVUBKqzGP9Q9v6q638t9wvUz6ZA== X-Received: by 10.99.117.85 with SMTP id f21mr25047428pgn.62.1488862242322; Mon, 06 Mar 2017 20:50:42 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id v143sm42722037pgb.47.2017.03.06.20.50.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Mar 2017 20:50:41 -0800 (PST) From: "Ngie Cooper (yaneurabeya)" X-Pgp-Agent: GPGMail Content-Type: multipart/signed; boundary="Apple-Mail=_806658F5-C68E-4E65-BC78-CCCA416A0B2B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Subject: SRCTOP/OBJTOP refactoring in ^/head Date: Mon, 6 Mar 2017 20:50:40 -0800 Message-Id: <8787E0E4-CD5D-4E53-BDF4-5E0ED1FD7069@gmail.com> Cc: FreeBSD Hackers To: "freebsd-arch@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 04:50:43 -0000 --Apple-Mail=_806658F5-C68E-4E65-BC78-CCCA416A0B2B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, I=E2=80=99m posting an official follow up to the numerous = commits I=E2=80=99ve been doing on ^/head to convert paths in Makefiles = from .CURDIR/.OBJDIR-relative paths to source (SRCTOP) / object (OBJTOP) = tree relative paths, e.g., like the following make snippet, $ svn diff | less # ... Index: Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc (revision 314827) +++ Makefile.inc (working copy) @@ -1,3 +1,4 @@ -.if exists(${.CURDIR}/../../Makefile.inc) -.include "${.CURDIR}/../../Makefile.inc" -.endif +FORTUNE_SRC=3D ${SRCTOP}/usr.bin/fortune +FORTUNE_OBJ=3D ${OBJTOP}/usr.bin/fortune + +.include "${SRCTOP}/usr.bin/Makefile.inc=E2=80=9D Index: fortune/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- fortune/Makefile (revision 314827) +++ fortune/Makefile (working copy) @@ -3,7 +3,7 @@ PROG=3D fortune MAN=3D fortune.6 -CFLAGS+=3D-DDEBUG -I${.CURDIR}/../strfile +CFLAGS+=3D-DDEBUG -I${FORTUNE_SRC}/strfile .include # ... Doing this has several benefits: 1. The make output is more abbreviated because it=E2=80=99s now = normalized to SRCTOP/OBJTOP. i. This benefits tools that take paths literally, like = Jenkins (it helped reduce the warning count by ~1,500 warnings in = r312513 because Jenkins was double-counting warnings for sys/modules/ath = ). ii. Logfiles will be smaller, which means that data = retention stress from CI services like Jenkins and Travis CI will be = reduced. iii. Less required I/O, which means: I. This reduces needed bandwidth when = transmitting the build output II. Speeds up terminal output. III. Reduces unnecessary writing to disk. 2. It makes it easier for humans to understand the layout of the = tree. 3. It makes it easier for humans/vendors to build on/customize = the components, instead of copy-pasting entire Makefiles and having to = keep them up-to-date, e.g., allows me for instance to .include = usr.sbin/syslogd/Makefile from foo/bar/syslogd/Makefile . Some of my changes I introduced previously manipulated = .CURDIR/.OBJDIR with the :H operator (strip one component, e.g., = foo/bar/baz.c -> foo/bar ). I had 3 individuals (bdrewery, imp, rgrimes) = ask for me to replace all :H uses I introduced in my refactoring with = SRCTOP/OBJTOP paths (I completely agree with the requests =E2=80=94 I = was just trying to keep the spirit of the original Makefiles intact). I will likely go back to committing by individual subdirectories = as the approach I took this past weekend (based on a suggestion from = rgrimes about not committing one directory at a time) was met with some = complaints from users about downstream vendors/projects dealing with = merge conflicts (I don=E2=80=99t care so much about MFCing changes=E2=80=A6= it=E2=80=99s pretty straightforward/mechanical and easier to test one = directory at a time if possible). Questions, comments, and other things (as long as there aren=E2=80= =99t too many torches/pitchforks) are more than welcome. Thanks, -Ngie --Apple-Mail=_806658F5-C68E-4E65-BC78-CCCA416A0B2B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYvjwhAAoJEPWDqSZpMIYV5GQP/iA1oelzKbcK8hvEbWM+6tsh rQ8LEYy4t6JKNk6diwgrVvNazmuIidOVU7u1EWDuMH1e51C6iB8WDRUqSnz7EF65 V2tfcaQ49dxy2FvrGRt/o0G2C2IHfcHbtywIzMeGPhQ0LB1Rc+TmHOrDK+8wvPZx 4DHmktySn4YCp4jNXlGYMqkPdW8ateIlOuOxUqQg5WIBUkf0OmgPqsvPYzYfB08Z fbY2GZAxIci91/488VyIyVKFRyPP/Fyt/Y9D5IEq4WPhx2Hav2cOVYePdUVjhlXD 1lpfX7WkpYXD/oY0Ul53lrCrgL2LzTa3irKBZu0+Do/Co4t2Uu3JJcsE3bbZ0gl+ jPNmx/D5tWgh9jazi07H3YNLoOjc08W7k61qp879qJaiCitpFI4Anrx4NuOWLPhe 7CehsIZQvMiXuo2RaK4L+5hzvJ0jCrlfZVKXI7zLSveo8ov4O591OITWHfWTEL2+ sq4+pi+Q9u7qU4wyiq0DcrhrfK5iD6RW8n1se/+UDl0B1LyRuZzJ6/MBT93L2iF+ /ZqqPadbGYKnQc+F59fQr3iCxZ+wrRUFXRgVGPb9K9gHQdJBVH7I1OcaT9xcGb97 VgLo5AJtUWu0VXLqaXTzMagmflhSOByZIKfv4DFsT3X2+YySnjVsp9Bl9zlsRsv4 SPJ2FIj9Qy11SRE/DP2e =eFbb -----END PGP SIGNATURE----- --Apple-Mail=_806658F5-C68E-4E65-BC78-CCCA416A0B2B--