DESTDIR support is broken (patch)

Julien ÉLIE julien at trigofacile.com
Fri Jun 6 20:15:03 UTC 2008


Hi Ivan,

>> if [ "$D$(MAN5)/../man8" = "$D$(MAN8)" ] && [ -d $D$(MAN5)/../man8 ] ; then \

Yep, I understand why it was silly to write that, sorry!
The strings are obviously not equal...


>>> I'd rather use [ $D$(MAN5)/../man8 -ef $D$(MAN8) ] here, but
>>> unfortunately `-ef' isn't required by POSIX.

Even though '-ef' is not supported on every platform, I would tend to use it.
Maybe somethink like that would be good:


 # We also create symbolic links between config files and programs.
+# If relative links can be generated, we prefer them to absolute links.
 install-man5:
        for M in $(SEC5) ; do \
            $(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
+       $(LN_S) $(MAN8)/docheckgroups.8 $D$(MAN5)/localgroups.5
+       $(LN_S) $(MAN8)/perl-nocem.8 $D$(MAN5)/nocem.ctl.5
+       if [ $D$(MAN5)/../man8 -ef $D$(MAN8) ] ; then \
+           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 ; \
+       fi



Do you agree?
Otherwise, I will put the absolute link with $(MAN8), that is to say
what is above without the comment and the last five lines.

-- 
Julien ÉLIE

« Une fois rien, c'est rien ; deux fois rien, c'est pas beaucoup,
  mais pour trois fois rien, on peut déjà acheter quelque chose,
  et pour pas cher. » (Raymond Devos) 



More information about the inn-workers mailing list