/usr/doc doesn't honour /etc/make.conf?

Hi gang,

And so I reached a new point in my FreeBSD endeavours: now I want to have the official documentation available on my server. Simply because I can, but also because I often enjoy using programs such as less or www/lynx to study documentation.

I discovered chapter 24.1 of the FreeBSD handbook which explains how you can use svn to check out a copy of the documentation, install textproc/docproj (or textproc/docproj-nojadetex if you don't need PDF or Postscript formats) and how to use this mixture to build your own documentation.

Now; I have to admit that I'm lazy. As such I'd rather put specific build options in /etc/make.conf so that I don't have to bother with them during updates or re-installs. And since the documentation told me that this is a liable option (section 25.4.5) this is exactly what I did. Here's my current /etc/make.conf:

Code:
# Pre-define Apache's suexec root directory
SUEXEC_DOCROOT=/home

# Options for building FreeBSD documentation
DOC_LANG="en_US.ISO8859-1"
FORMATS="txt html-split"

# added by use.perl 2013-06-03 02:18:10
PERL_VERSION=5.14.2
One problem: It doesn't work.

When I execute # make install in /usr/doc then this is what happens:

Code:
root@smtp2:/usr/doc # make install
===> en_US.ISO8859-1 (install)
===> en_US.ISO8859-1/articles (install)
===> en_US.ISO8859-1/articles/bsdl-gpl (install)
"/usr/doc/en_US.ISO8859-1/articles/bsdl-gpl/../../../share/mk/doc.docbook.mk", line 661: warning: Missing closing parenthesis for target()
"/usr/doc/en_US.ISO8859-1/articles/bsdl-gpl/../../../share/mk/doc.docbook.mk", line 661: Malformed conditional (!target(spellcheck-"txt html-split"))
"/usr/doc/en_US.ISO8859-1/articles/bsdl-gpl/../../../share/mk/doc.project.mk", line 103: if-less endif
make: fatal errors encountered -- cannot continue
*** [realinstall] Error code 1

Stop in /usr/doc/en_US.ISO8859-1/articles.
*** [realinstall] Error code 1

Stop in /usr/doc/en_US.ISO8859-1.
*** [realinstall] Error code 1

Stop in /usr/doc.
Pay attention to line 7: "Malformed conditional (!target(spellcheck-"txt html-split"))".

It didn't take me long to find out where the problem was. So next I commented out the FORMATS option in /etc/make.conf, then used: # make FORMATS="html html-split" install clean and it worked like a charm:

Code:
root@smtp2:/usr/share/doc/en_US.ISO8859-1/books/handbook # file trademarks.html
trademarks.html: XML document text
Press any key to continue...
I don't get it.

I tried changing the line in /etc/make.conf to use " or ' or nothing but no matter what I try; the moment I only define FORMATS in /etc/make.conf it prevents me from building the documentation.

What am I overlooking here?
 
I can duplicate the problem, but I've never tried to set the formats in make.conf. In fact, I generally only build the single-file HTML version in the doc directory, then use a web browser to access it with a file: URL.

If you really want to do that, ask on the freebsd-doc mailing list.
 
Try without the double quotes: FORMATS=txt html-split. I know it sounds weird but I vaguely remember that it was an issue with the quotes when I last tried that.
 
kpa said:
Try without the double quotes
I did. And with single quotes, no quotes (as you suggested) and even tried to escape the space. No go. I really think I might have hit a bug here. Anyway, although I don't quite like mailing lists -at all- I'm going to assign this one and share this with them, see where that takes me.
 
kpa said:
Try without the double quotes: FORMATS=txt html-split. I know it sounds weird but I vaguely remember that it was an issue with the quotes when I last tried that.
And I owe you an apology.

I was so certain that I had already tried this approach, but it seems that I must have overlooked it and only used the "escaped space" approach which, when looking back, is a little bit ridiculous. Actually it's completely ridiculous, because as someone else on the mailing list also stated: "That syntax would work in a shell script, but it isn't quite right for a makefile." (commenting on my original approach with using double quotes around the options).

In the mean time I also discovered that I somehow can't get the html-split option to work, but that's something I'll be looking into during the day. My initial problem which I stated here is solved.

The same person also gave me a good warning regarding putting these two options in the /etc/make.conf file: "I wouldn't recommend doing it that way, though, because those settings will be applied to every build through make, and the word FORMATS could easily turn up somewhere else.". Absolutely something to keep in mind.

Thanks guys for your comments.
 
Back
Top