Problem building with doc/ll_LL symlinked

Giorgos Keramidas keramida at freebsd.org
Thu Oct 28 03:44:45 UTC 2004


On 2004-10-28 00:58, Ion-Mihai Tetcu <itetcu at people.tecnik93.com> wrote:
> Hi,
>
> I'm trying to translate some docs in Romanian.
>
> So I have symlinked
> /usr/doc/ro_RO.ISO8859-2 -> /home/itetcu/projects/FRDP/freebsd-ro-l10n/doc/ro_RO.ISO8859-2

Don't.  It's not really going to work.

> When, in /usr/doc I
>    make DOC_LANG=ro_RO.ISO8859-2
> I get
> ===> ro_RO.ISO8859-2
> "Makefile", line 18: Could not find /home/itetcu/projects/FRDP/freebsd-ro-l10n/doc/ro_RO.ISO8859-2/../share/mk/doc.project.mk
> make: fatal errors encountered -- cannot continue
> *** Error code 1
>
> Stop in /usr/doc.

The makefiles of the doc tree set DOC_PREFIX to ${.CURDIR} as you have
noticed already.  The value make(1) gives to this variable is the `real
path' of the directory:

	% cd /tmp
	% mkdir foo
	% cat > foo/Makefile
	all:
		@echo ${.CURDIR}
	^D
	% ln -s foo bar
	% cd bar
	% make
	/tmp/foo

> However defining DOC_PREFIX works:
>  # make DOC_LANG=ro_RO.ISO8859-2 DOC_PREFIX=/usr/doc
> ===> ro_RO.ISO8859-2
> ===> ro_RO.ISO8859-2/articles
> ===> ro_RO.ISO8859-2/articles/cvsup-advanced
> ............
>
> But in /usr/doc/Makefile I see:
> DOC_PREFIX?=   ${.CURDIR}
> and  in /usr/doc:
>  # make DOC_LANG=ro_RO.ISO8859-2 -VDOC_PREFIX
> /usr/doc
>
> DOC_PREFIX?= ${.CURDIR} is propagated down the tree in each Makefile
> inclusive in directories holding article.sgml / book.sgml.

If you don't explicitly set DOC_PREFIX the makefiles will try to
`discover' its correct value by using the real path of the current
directory.  This will not work for symlinked directories.

By setting DOC_PREFIX to /usr/doc you turn off the lookup of symbolic
links and it all works again.



More information about the freebsd-doc mailing list