From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57862 invoked by alias); 25 Nov 2016 14:31:21 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 57817 invoked by uid 89); 25 Nov 2016 14:31:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=editors, flex, Hx-spam-relays-external:shaw.ca, H*r:shaw.ca X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Nov 2016 14:31:18 +0000 Received: from [192.168.1.100] ([174.0.238.184]) by shaw.ca with SMTP id AHX1cbRIsm7BbAHX2cjF35; Fri, 25 Nov 2016 07:31:16 -0700 X-Authority-Analysis: v=2.2 cv=XqWKARN9 c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=GW6EH1NoIogzqKzoLKMA:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: Standard LEX variable doesn't work in Make. Reply-To: Brian.Inglis@SystematicSw.ab.ca References: <11448207-52c8-6745-999f-48a4534bbc41@t-online.de> To: cygwin@cygwin.com Message-ID: Date: Fri, 25 Nov 2016 19:54:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <11448207-52c8-6745-999f-48a4534bbc41@t-online.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfOwkAK1f2r/OCpsPu6Tuhy4S13BAHNhmyLo2krx+7N7Mr8/XxtCTFPctnICeayuSzOuzYi+aWq6FO+HT/3M6LeWqDR1Cy0YD1OFDQGS+EosgyHcedpfZ Mg2heZ/7ZoTuXLK0nX7Hhd6wWW1M1rZGfewywAq47BBNIacXXmHtMUUGgLVGC+JtT9OrSHcPzibLMw== X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00286.txt.bz2 On 2016-11-21 12:09, Hans-Bernhard Bröker wrote: > Am 21.11.2016 um 17:57 schrieb Kaz Kylheku: > >> I'm changing a FOSS project to rely more on standard Make >> vars such as CC and CFLAGS and such: use $(CC) for >> the compiler unless told otherwise, incorporate $(CFLAGS) >> if it is defined, and so forth. This is friendly toward >> distro package maintainers. > > Not really. Package maintainers will almost universally expect your > source to have some kind of 'configure' script, which would take of > this and most other such properties for you. > >> Anyway, even though my Cygwin installation has GNU Flex, >> the lex command is nonexistent; thus the $(LEX) Make >> variable fails. > > It's not $(LEX) that's failing here; it's the way you form > expectations about what $(LEX) is supposed to be. The value of $(LEX) > is clearly documented to default to 'lex' (see "info make implicit > implicit"). > >> If the installation has some sort of lex, the >> predefined $(LEX) variable should resolve to it. > > No. LEX is a modifiable variable, for the express purpose that it be > set to what the system actually needs. Yes, that means _you_ are > supposed to do that (or to set up tools outside make to do it for > you). > > Morale: Make is not autoconf, nor does it want to be. > > One final note: your report is in no way specific to Cygwin, so this > is almost certainly the wrong mailing list to send it to. One solution, and the most common in Cygwin, is the package flex should create a symlink lex if no such symlink or exe exists; or by the FHS, create a group of alternatives, with a slave alternative for each of its public components e.g. bin, man, info, etc. files. Should Cygwin packages not be making more use of alternatives instead of creating direct symlinks in bin? I notice that out of 577 symlinks in Cygwin ...bin directories, sendmail and automake-doc are the only packages I have that install alternatives: 5 symlinks in ...bin and 13 in /etc/alternatives to man, bin, info. On my Debian system, out of 591 symlinks in ...bin directories, 126 are to /etc/alternatives, in which there are 297 symlinks, most to man, bin, jvm, and icons. They seem to be heavily used to support virtual, X, Gnome, desktop, and Java package provisioning and aliases, plus compilers, languages, editors, and network functions. Should there be promotion of alternatives instead of symlinks for programs offering common functionality and options, or which support multiple versions, in postinstall and preremove scripts? What should the standard priority for standard programs be, for popular non-standard programs that provide the same functions, and newer versions (automake-doc adds 5 each version)? -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple