From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9568 invoked from network); 9 Dec 2023 22:41:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Dec 2023 22:41:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1k0qN+u292pehctVEF7M4c/BsVwCzJQZgpROey8M8m8=; b=C8AlIYTOqyw9OdBIEGd7HiIoEi wM9Dd92hNEVFfOYw3BRdLhoWtiEMnWB2+UZtX+Hqtk47WY+ZWTvMTl246iqqfuy4Lc3EVrzI1Yq8z 8e7/RPHyFcRmQgT95iCLLVS/0AzTNA81PvzpupNoJBSaj/uKaJtFhcT7ESs88zQQlkUFXwt6FAB7P cr2OqOoPr4YuHT2RYEvrpDv9aJDYBQsWPhkLUlyvnYwxmlOC9FHAPJJrTYsWW2upoN5r9GXaFHodm 1XHR11IKMZi8cgqlRQFqIa4581vFUZFvqO6QFJydm35wwuaib1h3NXZ0rvi2a7NgzsN1sBDoTPsyj RmrzalBw==; Received: by zero.zsh.org with local id 1rC61E-000HOb-Gq; Sat, 09 Dec 2023 22:41:56 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rC610-000H6E-1m; Sat, 09 Dec 2023 22:41:42 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1rC60z-0004NV-Ko; Sat, 09 Dec 2023 23:41:41 +0100 cc: Zsh workers In-reply-to: From: Oliver Kiddle References: <50885-1702060132.779123@YSiF.CgC_.vGLi> To: Bart Schaefer Subject: Re: PATCH: Avoid \e in C code; building on Solaris 11 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16831.1702161701.1@hydra> Date: Sat, 09 Dec 2023 23:41:41 +0100 Message-ID: <16832-1702161701.642101@vOaD.NeTz.Fd-F> X-Seq: 52392 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Bart Schaefer wrote: > Annoyingly, it does leave a size zero > Src/builtin.syms and make clean then doesn't delete that (it fails) and > a subsequent attempt with gawk then fails to compile builtin.c. > > "(it fails)" means "make clean" actually returns error, or just that it doesn't > have a rule for removing .syms files? make clean returns an error. Looks like the Src/Makemod tries to recurse into Src/Builtins and that doesn't contain a Makefile. It had never got far enough to create it. > Would it work to prefix the awk recipe with "-" to ignore that error, and then > append another line to that recipe to clean up on awk failure? If you use an initial -, I don't think a subsequent line can get the return status. make uses separate shell instances for each line. The best I can think of is to append || (rm $@ && false) However, after taking another look at the awk script, I think the following patch is the best solution - using the octal escape \075 for the equals. awk '/=/' is a syntax error gawk '/\=/' complains that `\=' is not a known regexp operator And while it may be less readable, both are happy with '/\075/' Oliver diff --git a/Src/makepro.awk b/Src/makepro.awk index f69660531..0d53c5850 100644 --- a/Src/makepro.awk +++ b/Src/makepro.awk @@ -121,7 +121,7 @@ BEGIN { # initialiser. dcltor = substr(line, 1, RLENGTH-1) line = substr(line, RLENGTH+1) - sub(/=.*$/, "", dcltor) + sub(/\075.*$/, "", dcltor) match(dcltor, /^([^_0-9A-Za-z]| const )*/) dcltor = substr(dcltor, 1, RLENGTH) "@+" substr(dcltor, RLENGTH+1) match(dcltor, /^.*@\+[_0-9A-Za-z]+/)