Bug 5841 - Man page .so links broken throughout
Summary: Man page .so links broken throughout
Status: RESOLVED DUPLICATE of bug 5628
Alias: None
Product: xorg
Classification: Unclassified
Component: Build/Modular (show other bugs)
Version: 7.0.0
Hardware: All Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-09 00:52 UTC by Colin Watson
Modified: 2006-02-08 20:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Colin Watson 2006-02-09 00:52:34 UTC
The shadows.DONE target in a number of xorg components looks a bit like this
(this one's from bitmap; sometimes it's $(LIB_MAN_SUFFIX) rather than
$(APP_MAN_SUFFIX), as in e.g. libxext):

shadows.DONE:
        -rm -f $(man_shadows:=.@APP_MAN_SUFFIX@)
        (for i in $(man_shadows:=.@APP_MAN_SUFFIX@) ; do \
         echo .so man$(APP_MAN_SUFFIX)/bitmap.$(APP_MAN_SUFFIX) > $$i; \
         done)

This is incorrect, because the XORG_MANPAGE_SECTIONS macro reads as follows:

if test x$APP_MAN_SUFFIX = x    ; then
    case $host_os in
        linux*) APP_MAN_SUFFIX=1x ;;
        *)      APP_MAN_SUFFIX=1  ;;
    esac
fi
if test x$APP_MAN_DIR = x    ; then
    case $host_os in
        linux*) APP_MAN_DIR='$(mandir)/man1' ;;
        *)      APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
    esac
fi

Thus on Linux we're not installing into man$(APP_MAN_SUFFIX), we're installing
into man1 (or man3 in the case of libraries), and the shadows.DONE code creates
an incorrect .so link which will cause manual page readers to be unable to read
the shadow pages. (I maintain man-db, which is one such tool.)

I suggest changes along the lines of the following, in bitmap:

--- bitmap-1.0.1.orig/Makefile.am
+++ bitmap-1.0.1/Makefile.am
@@ -139,5 +139,5 @@
 shadows.DONE:
        -rm -f $(man_shadows:=.@APP_MAN_SUFFIX@)
        (for i in $(man_shadows:=.@APP_MAN_SUFFIX@) ; do \
-        echo .so man$(APP_MAN_SUFFIX)/bitmap.$(APP_MAN_SUFFIX) > $$i; \
+        echo .so $(notdir $(APP_MAN_DIR))/bitmap.$(APP_MAN_SUFFIX) > $$i; \
         done)

... and the following, in libxext:

--- libxext-1.0.0.orig/man/Makefile.am
+++ libxext-1.0.0/man/Makefile.am
@@ -48,13 +48,13 @@
 shadows.DONE:
        -rm -f $(all_aliases:=.@LIB_MAN_SUFFIX@)
        (for i in $(XShape_man_aliases:=.@LIB_MAN_SUFFIX@) ; do \
-       echo .so man$(LIB_MAN_SUFFIX)/XShape.$(LIB_MAN_SUFFIX) > $$i; \
+       echo .so $(notdir $(LIB_MAN_DIR))/XShape.$(LIB_MAN_SUFFIX) > $$i; \
        done)
        (for i in $(Xmbuf_man_aliases:=.@LIB_MAN_SUFFIX@) ; do \
-       echo .so man$(LIB_MAN_SUFFIX)/Xmbuf.$(LIB_MAN_SUFFIX) > $$i; \
+       echo .so $(notdir $(LIB_MAN_DIR))/Xmbuf.$(LIB_MAN_SUFFIX) > $$i; \
        done)
        (for i in $(Xevi_man_aliases:=.@LIB_MAN_SUFFIX@) ; do \
-       echo .so man$(LIB_MAN_SUFFIX)/Xevi.$(LIB_MAN_SUFFIX) > $$i; \
+       echo .so $(notdir $(LIB_MAN_DIR))/Xevi.$(LIB_MAN_SUFFIX) > $$i; \
        done)
        touch shadows.DONE

However, there are probably far too many affected components for me to attach
individual patches for each, and I don't have a full checkout of the modular
tree at the moment. If it isn't easy for somebody who does have such a checkout
to go through and fix all instances of this in one sweep, let me know and I'll
try to produce a patch.
Comment 1 Alan Coopersmith 2006-02-09 02:11:52 UTC
notdir is not widely enough available to be hardcoded in Makefiles.   I'm testing
another fix for this issue that is portable to the supported platforms.

*** This bug has been marked as a duplicate of 5628 ***
Comment 2 Daniel Stone 2006-02-09 15:59:23 UTC
reassigning to 'modular build system' rather than 'monolithic build system'. :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.