From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by sourceware.org (Postfix) with ESMTPS id BED903865C22 for ; Thu, 15 Feb 2024 18:47:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BED903865C22 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BED903865C22 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708022836; cv=none; b=dSm79P2ji0oefPdHk47WpUctOWNy4xz9ymlvhbzy1MzbPYcN4XqhbUQuLJE7Ab+/UNx1e6KvCE+Bp4kBOTTwoEjDfQS5D+q/8q3xNoeeggUjHsb9YvBMVPp0ql+cSgmVDRpXfSGbWsPgisU1PBRYVCAFYRnCw/24ND7nBXE/jvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708022836; c=relaxed/simple; bh=VZeARTFEMVn0BuAlRvTOPiBEwEjQIQPM4NRQdmG5Zoo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=AE74aXSyj5bTg0BLLgiFIJQ5NdqO/rBph5pksB1AyLMArTazdnQr/ugVtTwQPU6B+ulhY/XfGFowe0kprq6iAzzT/+vwvdxs79BocQJrREVDvB+aiIH6BXqmqnMcGufgLVz3nNcQGMBDba/RiNuCmKdoSRO+JZezSA/n+YhXGxw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-dcd7c526cc0so1259495276.1 for ; Thu, 15 Feb 2024 10:47:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708022833; x=1708627633; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hjdEldWyrAF5sNb8Tl2tCwoV1s7yhSVnIyhfgD+UH5c=; b=OuV9Ko6NBQD4NdfrSh7sF0ZJmVC3vs+DZbxJZg0nTQ/qRrD+cvK4a/3jPL5DErsinY A+MkTlLW74wU9iz7F6BLTr2tLwpBopwdvXicH4Rebox1elYw7S82gTq+InjGMmURSs4A pcU3jSMkCRNF9e082RsqYzICK8ew6EuFXHJjUgCm4mOUM2FOA/4dr1cRYxf8YPx9NxLc YZGV/GPuF46g0JHyrOjSap85esAkjCvO4NAQa3QV1ZKg1uGVE8EW2cXwEw8VwpgxAuqq iLHkBrnFoj2CMvKxyCNXwBZSxl+D3RBqDzVCoTOZGIcqnTdZ/Qyc60KCiyxnYnFpqedZ EBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708022833; x=1708627633; h=content-transfer-encoding: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=hjdEldWyrAF5sNb8Tl2tCwoV1s7yhSVnIyhfgD+UH5c=; b=EulRsG3X90j5oX43sgqD+/LWCUDWCdBHLkUpQvJj/4uHAFK8LPdgpCl7zU0dImAKLc +1tg2404rxi2VSuSgF8NPiL0+oP5RH1FUcyNZno9ilTerX+FfjFvHxX7O5nF/B8ZS+q4 N3WsVGCISfUpMmr5ZRn2dxpLO3biJSdtCyyitbA3tpJsjkbCzIJG/uKRWwFltnoLO5wU 2uGT0wtJ2ANKiKu5w4Nd38fuMwSo1DBkuPgCw3MyNy9b65pgTb/O5zG3D34TCq6ia6P5 EXt6DagnlJ4txZrC6sB8O5Lsf6XttYhaBrC9xCMnPrQfyrJUFi0Lg3ogfAsb9ibUBpHB XLDw== X-Gm-Message-State: AOJu0YxM24GoPiSjeIZlSJj4vk6eR0zhOFAXW9Orfhm9t+aEK6cO/maG m7b3b+a9ER/YDyoWvZVAc+gbd9+IjP9lzv1ZcqHmg+SfwOuv08V4qjCP9o6UNaimS99bU/IV9pT Gf/BwzQ/ftLkTDVclLPTNdcPPlN0= X-Google-Smtp-Source: AGHT+IEtWdKO7R5zSZKYm6T3iY4mC0K8oAixvgDpMiNZguu0fnjGz/uDoTKI5w0JDKfo2iRrjfZIoJDbYOHeUqS10jo= X-Received: by 2002:a5b:a82:0:b0:dcc:1c6c:430d with SMTP id h2-20020a5b0a82000000b00dcc1c6c430dmr2304042ybq.12.1708022833146; Thu, 15 Feb 2024 10:47:13 -0800 (PST) MIME-Version: 1.0 References: <20240215122903.394220-1-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Thu, 15 Feb 2024 10:46:37 -0800 Message-ID: Subject: Re: [PATCH v2] sort-makefile-lines.py: Allow '_' in name and "^# name" To: Sunil Pandey Cc: libc-alpha@sourceware.org, carlos@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3019.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Thu, Feb 15, 2024 at 9:28=E2=80=AFAM Sunil Pandey wr= ote: > > > > On Thu, Feb 15, 2024 at 4:29=E2=80=AFAM H.J. Lu wro= te: >> >> '_' is used in Makefile variable names and many variables end with >> "^# name". Relax sort-makefile-lines.py to allow '_' in name and >> "^# name" as variable end. This fixes BZ #31385. >> --- >> scripts/sort-makefile-lines.py | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/scripts/sort-makefile-lines.py b/scripts/sort-makefile-line= s.py >> index f65ee40e27..b2249aef6d 100755 >> --- a/scripts/sort-makefile-lines.py >> +++ b/scripts/sort-makefile-lines.py >> @@ -129,7 +129,7 @@ def sort_makefile_lines(): >> for i in range(len(lines)): >> # Look for things like "var =3D \", "var :=3D \" or "var +=3D \= " >> # to start the sorted list. >> - var =3D re.search(r'^([a-zA-Z0-9-]*) [\+:]?\=3D \\$', lines[i]) >> + var =3D re.search(r'^([-_a-zA-Z0-9]*) [\+:]?\=3D \\$', lines[i]= ) >> if var: >> # Remember the index and the name. >> startmarks.append((i, var.group(1))) >> @@ -140,7 +140,7 @@ def sort_makefile_lines(): >> rangemarks =3D [] >> for sm in startmarks: >> # Look for things like " # var" to end the sorted list. >> - reg =3D r'^ # ' + sm[1] + r'$' >> + reg =3D r'^ *# ' + sm[1] + r'$' >> for j in range(sm[0] + 1, len(lines)): >> if re.search(reg, lines[j]): >> # Remember the block to sort (inclusive). >> -- >> 2.43.0 > > > LGTM > > --Sunil I checked it in. I am pushing: https://patchwork.sourceware.org/project/glibc/list/?series=3D30990 to update Makefiles. --=20 H.J.