From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1CD163861863 for ; Thu, 15 Feb 2024 12:16:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CD163861863 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1CD163861863 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707999385; cv=none; b=E9RUxmdw6DnDQIodLEVVZdQkWpdfrQoirdilycGELXDb1FAj4EW+qvCLSwA6qg/OAcpfMht0RNnVqozzl5u+VY+h383+rQDiT6yaRmdRyaDvYyQSHLTW+KHTrHdaXijdEz60K+3209nzqmOwDoxREaJhDNCLQE3aC7pLgRqn8FI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707999385; c=relaxed/simple; bh=6hNMAQnx9vM1aTLxv7EZK6pNtVOnybgqxa+lOXdoLIE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YyZlyhtBRouS5WH/wLAZHyohAlytRjyq/IY8ZeKpAKNg119kuVXHy01k/aXY8IXhCYQOHs3zpiGy9/Zg97y9jPLMXCNoQA/kazsLnsV24K0bRhnzE3bri9CnOYS3kRREjj1IETy61KmkLlLbUl8qP/6jKYQTIeOAm7IgM/GgNeM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707999383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PILpPnubmFuI7BCqkAzYQOL+pfdwZmPYZwRsXq1dw4U=; b=O/S+2P5NWk9n4phEDbeFXCuzfqpH9WRDNWSzabRG+lt52FDF3qJa+/DpGWu00nMJ/9M62V 7ignELX4BKUFufviC9jOvzeOjt2YJuGqkRPWpSdsCtKB9h9n/k2J35+pv717Opn5nVKXxQ BIXiWoLkkWZefI4mThRsB60LYuZzK9U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-hPCAw1_8OOqV9ksdll7-IQ-1; Thu, 15 Feb 2024 07:16:22 -0500 X-MC-Unique: hPCAw1_8OOqV9ksdll7-IQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0BCCD859703; Thu, 15 Feb 2024 12:16:07 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AFA1C185C0; Thu, 15 Feb 2024 12:16:05 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: libc-alpha@sourceware.org, carlos@redhat.com Subject: Re: [PATCH] sort-makefile-lines.py: Allow '_' in name and "^# name" References: <20240215112719.392617-1-hjl.tools@gmail.com> Date: Thu, 15 Feb 2024 13:16:03 +0100 In-Reply-To: <20240215112719.392617-1-hjl.tools@gmail.com> (H. J. Lu's message of "Thu, 15 Feb 2024 03:27:19 -0800") Message-ID: <87edddc48s.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: * H. J. Lu: > '_' 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 | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/sort-makefile-lines.py b/scripts/sort-makefile-lines.py > index f65ee40e27..ea02412d67 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 = \", "var := \" or "var += \" > # to start the sorted list. > - var = re.search(r'^([a-zA-Z0-9-]*) [\+:]?\= \\$', lines[i]) > + var = re.search(r'^([a-zA-Z0-9-_]*) [\+:]?\= \\$', lines[i]) > if var: > # Remember the index and the name. > startmarks.append((i, var.group(1))) Please keep the literal - at the end of the bracket expression. I think it's easier to read even if it may be semantically the same. Thanks, Florian