From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 75BE93858C98 for ; Thu, 21 Mar 2024 14:33:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75BE93858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 75BE93858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711031584; cv=none; b=CLxec+a7r8fYseCaJRW89rWgLWvqoKLrDWyiL/1wAkIWGJ6Ft2wJiDFbmQe9E4mcMEdazbX+RM3ademCDgGuAwj6J8pujMXB776Ln3x6GYByGmAyX4emdIV+uPb80OZwNeF4DgnrK3FjAotWlDkHW+tKAemghZWtc8Xzwx0AqK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711031584; c=relaxed/simple; bh=exrS5Cncs8sT4Jed1gLVT5Q84rvADDMDi9EeU5JUwEY=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=P0Pk7C4AE7AhAuEhPqwNpUOZvmbyCMvySrvngiIGnYg2ZhSy1zwSvHL8xF8T0loy5YHrIsfo1igyIcdiEu6j9oht2mX0r/Q5X+n7/tjBMu6P8VBuTmNS8cSvNRalBh5FTPjMPTZVIXB5kAvfTejh3xGlVHDxIiXOQjN4x8XZ7bo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so1482840a12.0 for ; Thu, 21 Mar 2024 07:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711031581; x=1711636381; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s4nusIIhnbt+OrwOItF2mNXZ70HBH7V6F+dPKkEgWCk=; b=hXnJLbdBnFhsyXBHDFPSC9vms5//Bks17638dTaaJITqL02IDNhJR6Bf7qCtY5UVuk 4dZtSb8FqTE0yOKPqfYBoYm+T7kEdvLLi063aFJplYL+JTPq1gpPJbkCDPWNCE9+4hEX 7lxkx0sB0yazA+k4gTPNsUK8gcG1tlkX3OOkId6msKYxEwIIo27DVZutEnIzL2f+7EX7 r5aTj+GSMf6uk3P5/ytNGTLysEiuUQLd7nNzv1HCbiHirQ5KabjPLSj0YIYOVA0PQfGD a6YWvPbp5+vQYWIrtYe3nk4Be5B5fYBRZDft0TBjjM4uRuvynz/VAWAgmxc/26pDFCtm WoUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711031581; x=1711636381; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s4nusIIhnbt+OrwOItF2mNXZ70HBH7V6F+dPKkEgWCk=; b=HKkZoo+y+lAcC7YofQmwQBpAln9aVR2gGUdTMkahiE01csIMS3EILqDh6s2gFGemwH ll73aqKyZTmDZv66a7qmrJjTRIBYMuoYnwGIDb+g8YcgMknnI7VEtJLq13VCcMM0LCYz kJxblEmas0pYHQek20WS7w+yFJ2qZPD9x8t36sRtvKgPNuEVjm+xY54LZJiOWarv7Dyg ux5k5oo8gAzq961V3qUFcOG0NGl2uS5OHijPBmtTLZC8cQ81q7qeTAf7O7m5EUdXsZlE uWvBcXNPQ0VoCGa/NAo4S8rx7X5AC4lgoL1+JjlyaI0JpBLzc/TpOkSEAjjndyiuiaD6 /Tmg== X-Gm-Message-State: AOJu0YyQvyF5Ey86zY4NyP2Dj+XBk7rRf3fK5qlKOeRsby42qWYuHCli I7yJ/KcbBtzA1eSdAOIeF2RX+CWFzqqc8rsGjO89MLNf5jlUW+Fa3YtMen9rQbvfbPIjVDRb540 sV2UmgwskPqUyVlSwzArQ1G9iFt16k71VR1nMGw== X-Google-Smtp-Source: AGHT+IFXQki7aQ3FWXDQC10lePle/W3v3dTheJMQ6HRPwSpcYKmfAbmd1VBOx8kTCG9JmC1ESzMINHOo+Eh1Kisuvnc= X-Received: by 2002:a17:906:46c8:b0:a46:d718:cd28 with SMTP id k8-20020a17090646c800b00a46d718cd28mr3349847ejs.1.1711031580957; Thu, 21 Mar 2024 07:33:00 -0700 (PDT) MIME-Version: 1.0 References: <20240313080237.1143034-1-christophe.lyon@linaro.org> <1eb529f2-3842-4090-a8e2-f713a28f2394@simark.ca> <33f72ef7-f990-437d-8fc4-dba08d7db24b@simark.ca> In-Reply-To: <33f72ef7-f990-437d-8fc4-dba08d7db24b@simark.ca> From: Christophe Lyon Date: Thu, 21 Mar 2024 15:32:51 +0100 Message-ID: Subject: Re: [RFC] add regenerate Makefile target To: Simon Marchi Cc: binutils@sourceware.org, gdb@sourceware.org, gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 20 Mar 2024 at 16:34, Simon Marchi wrote: > > On 3/18/24 13:25, Christophe Lyon wrote: > > Well the rule to regenerate Makefile.in (eg in in opcodes/) is a bit > > more complex > > than just calling automake. IIUC it calls automake --foreign it any of > > *.m4 file from $(am__configure_deps) that is newer than Makefile.in > > (with an early exit in the loop), does nothing if Makefile.am or > > doc/local.mk are newer than Makefile.in, and then calls 'automake > > --foreign Makefile' > > The rules looks complex because they've been generated by automake, this > Makefile.in is not written by hand. And I guess automake has put > `--foreign` there because foreign is used in Makefile.am: Yes, I know :-) > > AUTOMAKE_OPTIONS = foreign no-dist > > But a simple call so `automake -f` (or `autoreconf -f`) just works, as > automake picks up the foreign option from AUTOMAKE_OPTIONS, so a human > or an external script who wants to regenerate things would probably just > use that. Indeed. I guess my concern is: if some change happens to Makefile.am/Makefile.in which would imply that 'autoreconf -f' would not work, how do we make sure autoregen.py (or whatever script) is updated accordingly? Or maybe whatever change is made to Makefile.am/Makefile.in, 'autoreconf -f' is supposed to handle it without additional flag? > > > The bot I want to put in place would regenerate things as they are > > supposed to be, then build and run the testsuite to make sure that > > what is supposed to be committed would work (if the committer > > regenerates everything correctly) > > For your job, would it be fine to just force-regenerate everything and > ignore timestamps (just like the buildbot's autoregen job wants to do)? > It would waste a few cycles, but it would be much simpler. > Yes, that would achieve the purpose: be able to handle as many patches as possible in precommit-CI. And as described earlier, for binutils this currently means: autoregen confgure --enable-maintainer-mode make all (with a low -j value otherwise we have random build failures) and my proposal to workaround the problem with -j is to do make all-bfd all-libiberty regenerate -j1 make all -j XXX Another possibility would be a policy change in how patches are submitted, to require that they contain all the autogenerated files. > Simon