DESTDIR support is broken (patch)
Ivan Shmakov
oneingray at gmail.com
Fri Jun 6 01:40:48 UTC 2008
>>>>> Julien ÉLIE <julien at trigofacile.com> writes:
>> But please note that the code above silently assumes that both
>> $(MAN5) and $(MAN8) are subdirectories of a common directory and
>> their ``base'' names are `man5' and `man8', respectively.
> You're right.
>> Thus, it's worthwhile to mention the assumption made at least in the
>> code comments. A better solution would be to check whether the
>> assumption is actually satisfied and, if it isn't, to fall back
>> creating absolute symbolic links (as was done before.)
> Does this patch suit you?
> ===================================================================
> --- doc/man/Makefile (révision 7854)
> +++ doc/man/Makefile (copie de travail)
> @@ -53,8 +53,13 @@
> $(CP_MAN) $$M $D$(MAN5)/$$M ; \
> done
> rm -f $D$(MAN5)/localgroups.5 $D$(MAN5)/nocem.ctl.5
> - $(LN_S) ../man8/docheckgroups.8 $D$(MAN5)/localgroups.5
> - $(LN_S) ../man8/perl-nocem.8 $D$(MAN5)/nocem.ctl.5
> + if [ -r $D$(MAN5)/../man8 ] ; then \
I'd rather use [ $D$(MAN5)/../man8 -ef $D$(MAN8) ] here, but
unfortunately `-ef' isn't required by POSIX.
Also, it might be something like:
if [ $(dir $(MAN5))/$(notdir $(MAN8)) = $(MAN8) ] ; then ...
though I don't know whether these Make functions are portable.
> + $(LN_S) ../man8/docheckgroups.8 $D$(MAN5)/localgroups.5 ; \
> + $(LN_S) ../man8/perl-nocem.8 $D$(MAN5)/nocem.ctl.5 ; \
> + else \
> + $(LN_S) $(MAN8)/docheckgroups.8 $D$(MAN5)/localgroups.5 ; \
> + $(LN_S) $(MAN8)/perl-nocem.8 $D$(MAN5)/nocem.ctl.5 ; \
> + fi
> # auth_krb5 is conditionally compiled, so handle it specially. actsync(8)
> # also covers actsyncd.
> It seems to work fine. (And whether $D is put in the condition does
> not matter.)
It'll break in the following case:
# ls -d /foo/man/man5
/foo/man/man5
# make MAN5=/foo/man/man5.my MAN8=/foo/man/man8.my install
More information about the inn-workers
mailing list