discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: "LÉVAI Dániel" <leva@ecentrum.hu>
Cc: discuss@mdocml.bsd.lv
Subject: Re: "cannot parse date" for a seemingly valid .Dd parameter
Date: Fri, 29 Aug 2014 17:38:00 +0200	[thread overview]
Message-ID: <20140829153800.GD6975@iris.usta.de> (raw)
In-Reply-To: <20140828210731.GB15202@serenity.local>

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

  reply	other threads:[~2014-08-29 15:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 14:58 LÉVAI Dániel
2014-08-27 15:07 ` Kristaps Dzonsons
2014-08-27 15:15   ` LÉVAI Dániel
2014-08-28  0:43     ` Ingo Schwarze
2014-08-28  8:39       ` LÉVAI Dániel
2014-08-28 16:11         ` Ingo Schwarze
2014-08-28 16:32           ` LÉVAI Dániel
2014-08-28 17:35             ` Ingo Schwarze
2014-08-28 18:06               ` LÉVAI Dániel
2014-08-28 19:49                 ` Ingo Schwarze
2014-08-28 21:07                   ` LÉVAI Dániel
2014-08-29 15:38                     ` Ingo Schwarze [this message]
2014-08-30  8:57                       ` LÉVAI Dániel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140829153800.GD6975@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    --cc=leva@ecentrum.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).