From nobody Fri Feb 18 17:19:27 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4449E19D738C for ; Fri, 18 Feb 2022 17:19:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K0djR2bqjz4Sgf for ; Fri, 18 Feb 2022 17:19:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa31.google.com with SMTP id f12so5184022vkl.2 for ; Fri, 18 Feb 2022 09:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6EqcDh/982mWqmMfDg5uTfmgWVqCZF70GmSiawHoaWI=; b=NAxqUQ/sX9G3FQq2bIhEdN9WB7G3Fo7dnfLHr11sVwTUPIq/ccxHGd1v+ck3mnevOH VGLh8KrvnKSEX/g814BLpqkjVQy3EoAddPe5cibgOuYcdpcR8yixzDTtxz7pOhdvepsg 2YnyugUtlHNvKesIS1/8OikEQ6M/X18wkYuCOchUOMSjeeKxil1m/DuqCY6ap3elMkrr 7ZtTUv+mO48QUgb2e+45X4sZGUbHpLrVvKhUw7F2xvOFmLfL0nc/9ie5oNrh0u04Uw+R zrzC5Mr13BjE7pKdZfPxpmJZLYiCxv9YVAj3KodFgbqHKrUA8B22VO0/ZnFg9qWYrhDL stOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=6EqcDh/982mWqmMfDg5uTfmgWVqCZF70GmSiawHoaWI=; b=c/7pOp8rOCMvv+UBmUVZo04xYURqDNB1+hXiMlnkGS+40guiY7xiWz/05/7dMd1OcC tajTdD3CJzyUl/VJg7JFuL/XK3MmZGoC2cL3fENZIAzrIDSiPaY0j24KAuRjJDmzoSIQ ltZYEGWahzpwYpoKDJjG/VgZvVtc0/rwobK0rpTJk9YE8AWkPsI5yTrans4jH2RDuxKe NXndk8Bi0wpBL5A1t/wddjd/bGtdAAO0iFuhK0NtpI5KuR4LNsP+sTj6+Iv2ChMvn/g3 377+loizktWdjzb53WseqapSNFU2iP0xw1spBlLNq8bPckpnEsNwEEaIAtTzXxjFatRA B4Qg== X-Gm-Message-State: AOAM530ACD2KXuKrdAsGbk5sm4h7L7MOus419AkuUtyBEERFepnieoKZ /i/6YAmz89tZk7HBW1BKKl0eF5MpZ0p+Rn0B+mxI9XkUseE= X-Google-Smtp-Source: ABdhPJwtnyGyi0Ss63PgIrS4BBdsSLdAa+YrI/kJbpvs23jep+86DbRR8hOQXuSLsl14kwZVQqN58bARhVGlFy7rSCY= X-Received: by 2002:a05:6122:509:b0:331:188f:76cb with SMTP id x9-20020a056122050900b00331188f76cbmr4217626vko.40.1645204778433; Fri, 18 Feb 2022 09:19:38 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <20220218142803.t444nf77dh2sfkgb@nexus.home.palmen-it.de> <20220218165702.jlfiqrngjzsc2b45@nexus.home.palmen-it.de> In-Reply-To: <20220218165702.jlfiqrngjzsc2b45@nexus.home.palmen-it.de> From: Warner Losh Date: Fri, 18 Feb 2022 10:19:27 -0700 Message-ID: Subject: Re: How to generate a Makefile.depend? To: FreeBSD Hackers Content-Type: multipart/alternative; boundary="00000000000066d55c05d84e1653" X-Rspamd-Queue-Id: 4K0djR2bqjz4Sgf X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b="NAxqUQ/s"; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::a31) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-0.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_SPAM_LONG(0.73)[0.728]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::a31:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-hackers]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000066d55c05d84e1653 Content-Type: text/plain; charset="UTF-8" On Fri, Feb 18, 2022 at 9:58 AM Felix Palmen wrote: > * Kyle Evans [20220218 09:44]: > > Makefile.depend falls in "do not worry about it" territory; they're > > only used for dirdeps mode, which to my understanding will tolerate > > and generate the missing Makefile.depend as it goes anyways. bdrewery > > or sjg periodically commit/update .depend files. > > Oh, that's really good to know, thanks! > > I guess I was confused because I found some old slides and other stuff > about meta mode suggesting you had to generate them somehow, but lacking > clear instructions. Could be worth mentioning in the developers > handbook! > > So, to phab we go soon I guess, thanks again. > So, Makefile.depend is used only for dirdep mode. It is not used for normal META mode. In dirdep mode, you can cd src/bin/ls and type make from a clean tree. It will rebuild libc, csu, compiler_rt and whatever else ls might depend on. Unless you are using dirdep and have mostly clean trees, you won't notice if it's missing. There is an out-of-tree python script that generates these from time to time quickly. There's a make target 'make bootstrap-this' which will generate it for the current directory (I believe, I'm reading code here). There's also a 'make bootstrap-empty' that might be needed depending on the bootstrap method. I *think* from the comments you could do a meta mode build, which would populate the objdir with all the artifacts that the above targets use to generate Makefile.depend and then use the above target to generate the Makefile.depend for the one directory. I usually don't bother, as I know these are regenerated from time to time, but I'm always happy to change my workflow if there's enough hassle to people from it. Warner --00000000000066d55c05d84e1653 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Feb 18, 2022 at 9:58 AM Felix= Palmen <felix@palmen-it.de>= ; wrote:
* Kyle = Evans <kevans@fr= eebsd.org> [20220218 09:44]:
> Makefile.depend falls in "do not worry about it" territory; = they're
> only used for dirdeps mode, which to my understanding will tolerate > and generate the missing Makefile.depend as it goes anyways. bdrewery<= br> > or sjg periodically commit/update .depend files.

Oh, that's really good to know, thanks!

I guess I was confused because I found some old slides and other stuff
about meta mode suggesting you had to generate them somehow, but lacking clear instructions. Could be worth mentioning in the developers
handbook!

So, to phab we go soon I guess, thanks again.

So, Makefile.depend is used only for dirdep mode. It is not used for=
normal META mode. In dirdep mode, you can cd src/bin/ls and type=
make from a clean tree. It will rebuild libc, csu, compiler_rt a= nd whatever
else ls might depend on. Unless you are using dirdep = and have mostly
clean trees, you won't notice if it's mis= sing. There is an out-of-tree python
script that generates these = from time to time quickly. There's a make target
'make bo= otstrap-this' which will generate it for the current directory (I
=
believe, I'm reading code here). There's also a 'make boot= strap-empty'
that might be needed depending on the bootstrap = method.

I *think* from the comments you could do a= meta mode build, which
would populate the objdir with all the ar= tifacts that the above targets use
to generate Makefile.depend an= d then use the above target to generate
the Makefile.depend for t= he one directory.

I usually don't bother, as I= know these are regenerated from time to
time, but I'm always= happy to change my workflow if there's enough
hassle to peop= le from it.

Warner
--00000000000066d55c05d84e1653--