From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lucy.dinwoodie.org (b.8.0.0.8.9.b.0.2.f.0.9.2.a.d.b.d.a.0.2.5.1.e.d.0.b.8.0.1.0.0.2.ip6.arpa [IPv6:2001:8b0:de15:20ad:bda2:90f2:b98:8b]) by sourceware.org (Postfix) with ESMTPS id 61BB93858012 for ; Thu, 10 Mar 2022 16:41:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 61BB93858012 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinwoodie.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinwoodie.org Received: from adam by lucy.dinwoodie.org with local (Exim 4.94.2) (envelope-from ) id 1nSLrR-005Ci5-Gu for cygwin-apps@cygwin.com; Thu, 10 Mar 2022 16:41:57 +0000 Date: Thu, 10 Mar 2022 16:41:57 +0000 From: Adam Dinwoodie To: cygwin-apps@cygwin.com Subject: Cygport configure script argument handling Message-ID: <20220310164157.r5nejhdgz4tcaprc@lucy.dinwoodie.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2022 16:42:01 -0000 I've fallen down a slight rabbit hole looking at the cygconf function in Cygport's autotools.cygclass. The specific bit of code that's causing me consternation is thus: case "x${confver}" in x2.6[0-9]*) confargs+=" --docdir=/usr/share/doc/${PN} --htmldir=/usr/share/doc/${PN}/html" ;; *) confargs+=" --infodir=${prefix}/share/info --mandir=${prefix}/share/man" ;; esac Firstly, I think the glob is incorrect: it looks like it was intended to match files that came from Autoconf versions 2.60 and up -- 2.60 is when Autoconf added the docdir and htmldir arguments -- but it has stopped working as expected: Autoconf released 2.70 in December 2020, and is now up to 2.71. The above code won't match those versions. Secondly -- and I'm not sure if this is intended or not -- I don't understand why --infodir and --mandir are only defined for versions prior to 2.60 (and, apparently unintentionally, 2.70 onwards). Those are valid both before and after 2.60. My best guess is that the intent was for the first option to fall through to the second, so for 2.60+ all four options would be defined, but that would have required `;&` or `;;&` rather than `;;`. Can anyone explain what the intent of this code is? Are these both the bugs that I think they are, or am I missing the intent?