From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id E9B58385843B for ; Fri, 12 Apr 2024 20:06:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9B58385843B 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 E9B58385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712952408; cv=none; b=YFseJ5Dzom0BaSCpDve9mTw5pKp2Xax4+omtrQiBrxNy5TzRjVzZFDrtRURZ/5MsFvQJs+tOFvQ5asNtiCydNmGWF9GoAZz3s0VW4RybK+ffxilEQ3qYv6B8r+dj7t3flLOh0iC4dpnT7NFCErq830d3rPXoBLO2Lx42ZXDEQJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712952408; c=relaxed/simple; bh=rHXNd+z6P/RDfAddYv0yMUKCPSGDz3xzr+s0gkyH88U=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=AMUr3EK8qco0FAskK1O8VhBBw6W9qxhMPWXhbu9yplZagXueqDc0WTOQp7W4XBLovakYLKX/2U0utY1hh+MgWob6qb5TWgeRy2itr+U05Xv34/whRwkBPDTm+zMUXXhGaHufx0ZCedYa7Sh9DbvF4ibNrc+P5FBRNwWxOoGEPRk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3c603f6eb37so485510b6e.1 for ; Fri, 12 Apr 2024 13:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712952404; x=1713557204; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PPK9FGi3Spdr61ltNxEgmVREhlWKG7df1HwoVLXyenI=; b=c/y5zg8ouS6t4MOuRPdMlZD2F+/jrFsTmm55NWZXLyu+0jp4OHKwrj2paA530cI/Li wviDpyh3uho8Z/wH9jzDlexp4zUWp4ILW9ouC8LlRFNRHdOCfWqO3F6VTcbsNRPUV2jm C4NFuZ+noWnOKhb6druW7BNYGdRY466x5LA8rEXk7irWABuQMY0SqkzVWQxIjSKr2EHF kNDUrpoa6eaWZJv7H3pcSTV5NYNR4z2/4pQpvnfovoOx/l+aHDyFWyGPvQBWGiYDPyJR ieAl0cTJ8ICV2BuQt/4pRup4U5DnR46HW43zf84eg0gPjcKO8z9N3Rgjyj5sDlfS4Pep pmxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712952404; x=1713557204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PPK9FGi3Spdr61ltNxEgmVREhlWKG7df1HwoVLXyenI=; b=FomILjqEvdAgZAAqrNVIGVQItK0jn17FHgjYfohi01iK6JaZICEiLHlraRIQpdtYNQ PypBBpR2Y5dC5/gnl1nPQqqr5vlLOVgKi+3w7nZJTQdmfGPIKCPKFBFbOfYgyMsds+Ou y/48wI/chZFM8IjgGe/hjuTcMSCqCG3FP5Nu65OvbfPUdU+XxPV4E/lkKsEWkT5cuNK2 IqtNzYOoQp43fFFcbirVS+2G6mS2Z7nu3W5MPn8fpSz7gCOkWRNmg4//R4CN5lKsS9mb 6chkyA7rKncoIDEphgKmDSZDg6vqvuSdrMohpRTWPMft7licuLBBq7kl1uGdgG1bThRH C3rA== X-Gm-Message-State: AOJu0YwTaY1fohytj+zt/JH9ftmfYe33jhrm6La5BCOQxJzE8AggmB2z HxZa75SClSJ2EVqSKHw4QSpqp00JJ9aIeBgQ+KFaI7Hef3ztF4Tos1kzzMg1Q83o2DQLqIfxVGT 72xz0bg== X-Google-Smtp-Source: AGHT+IE/bUdxUtL16WBCaMNzIw/jB6H7Vh01NUAOKyZ6UeWlXPjIA4ic8LvrDP74qviHeCojHcZFUg== X-Received: by 2002:a05:6808:1444:b0:3c6:f93d:7107 with SMTP id x4-20020a056808144400b003c6f93d7107mr2408340oiv.10.1712952404458; Fri, 12 Apr 2024 13:06:44 -0700 (PDT) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id b1-20020a056808010100b003c5f54d014dsm701654oie.51.2024.04.12.13.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 13:06:43 -0700 (PDT) From: Christophe Lyon To: buildbot@sourceware.org Cc: Christophe Lyon Subject: [PATCH 5/6] autoregen.py: Add support for autogen Date: Fri, 12 Apr 2024 20:05:58 +0000 Message-Id: <20240412200559.1649050-6-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240412200559.1649050-1-christophe.lyon@linaro.org> References: <20240412200559.1649050-1-christophe.lyon@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: GCC's toplevel Makefile.in is generated with autogen Makefile.def (which uses Makefile.tpl too) --- builder/containers/autoregen.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py index 4731a87..d1ab217 100755 --- a/builder/containers/autoregen.py +++ b/builder/containers/autoregen.py @@ -21,6 +21,8 @@ ACLOCAL_BIN = next(name for name in ACLOCAL_NAMES if shutil.which(name)) AUTOHEADER_BIN = next(name for name in AUTOHEADER_NAMES if shutil.which(name)) AUTORECONF_BIN = next(name for name in AUTORECONF_NAMES if shutil.which(name)) +AUTOGEN_BIN = "autogen" + # autoconf-wrapper and automake-wrapper from Gentoo look at this environment variable. # It's harmless to set it on other systems though. EXTRA_ENV = { @@ -29,6 +31,7 @@ EXTRA_ENV = { "AUTOCONF": AUTOCONF_BIN, "ACLOCAL": ACLOCAL_BIN, "AUTOMAKE": AUTOMAKE_BIN, + "AUTOGEN": AUTOGEN_BIN, } ENV = os.environ.copy() ENV.update(EXTRA_ENV) @@ -110,6 +113,9 @@ def run_shell(cmd: str): def regenerate_with_autoreconf(): run_shell(f"{AUTORECONF_BIN} -f") +def regenerate_with_autogen(): + run_shell(f"{AUTOGEN_BIN} Makefile.def") + def regenerate_manually(): configure_lines = open("configure.ac").read().splitlines() if folder.stem == "fixincludes" or folder.stem == "libgm2" or any( @@ -166,12 +172,20 @@ run_shell(f"{AUTOHEADER_BIN} --version") print(f"Extra environment: {EXTRA_ENV}", flush=True) config_folders: list[Path] = [] +autogen_folders: list[Path] = [] repo_root = Path.cwd() for root, _, files in os.walk("."): for file in files: if file == "configure.ac": config_folders.append(Path(root).resolve()) + if file == "Makefile.tpl": + autogen_folders.append(Path(root).resolve()) + +for folder in sorted(autogen_folders): + print(f"Entering directory {folder}", flush=True) + os.chdir(folder) + regenerate_with_autogen() for folder in sorted(config_folders): if folder.stem in SKIP_DIRS: -- 2.34.1