From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7TFcpUO013245 for ; Fri, 29 Aug 2014 11:38:53 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1XNOGF-0002IW-6X; Fri, 29 Aug 2014 17:38:47 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1XNOGF-0006cc-58; Fri, 29 Aug 2014 17:38:47 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1XNOGE-0000ph-VJ; Fri, 29 Aug 2014 17:38:47 +0200 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1XNOFU-0003Q5-GL; Fri, 29 Aug 2014 17:38:00 +0200 Date: Fri, 29 Aug 2014 17:38:00 +0200 From: Ingo Schwarze To: =?iso-8859-1?Q?L=C9VAI_D=E1niel?= Cc: discuss@mdocml.bsd.lv Subject: Re: "cannot parse date" for a seemingly valid .Dd parameter Message-ID: <20140829153800.GD6975@iris.usta.de> References: <53FDF43F.3060001@bsd.lv> <20140827151513.GJ29425@serenity.local> <20140828004342.GF912@iris.usta.de> <20140828083900.GM29425@serenity.local> <20140828161103.GR912@iris.usta.de> <20140828163215.GN29425@serenity.local> <20140828173522.GT912@iris.usta.de> <20140828180617.GA15202@serenity.local> <20140828194910.GW912@iris.usta.de> <20140828210731.GB15202@serenity.local> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140828210731.GB15202@serenity.local> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Daniel, LÉVAI Dániel wrote on Thu, Aug 28, 2014 at 11:07:31PM +0200: > On cs, aug 28, 2014 at 21:49:11 +0200, Ingo Schwarze wrote: >> Daniel Levai wrote: >>> $ CFLAGS='-DOSNAME=\"Slackware\ Linux\"' make >> Gah. That's not the way to do it. [...] >> Indeed. What happens here is that you completely screw up the >> CFLAGS of ./configure, and all configuration tests fail. That sentence is important. Look at config.log. > But it doesn't seem to break the CFLAGS variable here. > Everything stays in it during compile: It breaks configure, not compile. > $ CFLAGS='-DOSNAME=OSNAMEEEE' make That's going to break badly. mdoc_validate.c is not going to compile. Quotes are missing here. Without the quotes, the failure mode is different. Now ./configure will work fine, but compiling will break. It will still fail. > Furthermore, the problem also remains when I edit only the Makefile: > > $ fgrep OSNAME ./Makefile > # CFLAGS += -DOSNAME="\"OpenBSD 5.5\"" > CFLAGS += -DOSNAME="\"Slackware\ Linux\"" > $ make OUCH. You are right. Passing CFLAGS into the Makefile works (contrary to what i thought at first), what is broken is passing them *from* the Makefile to ./configure. Quoting is screwed in that passage, and i see no way to fix that. > [...] >> Btw., can you update this: >> http://slackbuilds.org/slackbuilds/14.1/system/mdocml/ >> ? > Sure thing, but I need to get this problem out of the way :P Not really; the Slackware port doesn't set OSNAME, and if you update it to 1.13.1, i'd recommend to stick to that for now. You can then introduce it for 1.13.2 if you think it should be there. For your private use, given that the build system was mostly rewritten for 1.13.2 anyway, i'm not going to invent horrenduous workarounds for OSNAME in 1.13.1; we have to accept that OSNAME is somewhat broken in 1.13.1. A simple workaround goes like this: 1. Make sure the OSNAME line is commented out in the Makefile. All other variables should already be set as desired. 2. Run "make clean". 3. Run "make config.h". 4. Check that config.h and config.log look reasonable. (They do on my Linux box.) 5. Edit the Makefile and uncomment (enable) the OSNAME line. 6. Run "make". Watch closely and be sure that ./configure is *not* run at this time. 7. Test "./mandoc -Wall -Tlocale ..." Admittedly, that's slightly ugly, but short of releasing 1.13.2, i cannot think of a better fix, and 1.13.2 isn't quite ready yet. If you *must* set OSNAME in the port, something like the following would be needed: - rename CFLAGS to CONFLAGS (or something) in Makefile (6 definition lines) - use CONFLAGS in the "config.h:" rule - set CFLAGS = $(CONFLAGS) -DOSNAME="\"...\"" (will get picked up by automatic rules) Like that, compile will use OSNAME and configure will not. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv