pyhalov
2014-10-13 64adfedd9e9c60ce3255bdafd6b3ed2f12d720cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# In-house patch created to keep inappropriate full pathnames
# on build systems from being included in the ri Ruby doc files.
# Patch is Solaris specific and not appropriate for upstream use.
 
--- ruby-1.9.3-p484-orig/common.mk    2012-12-20 02:10:05.000000000 -0800
+++ ruby-1.9.3-p484/common.mk    2014-04-18 16:53:10.198728000 -0700
@@ -402,9 +402,17 @@
 post-install-doc::
     @$(NULLCMD)
 
+# Eliminate full pathname from source directory references
+# in RDoc ri files.
+# Create a symlink here to the source directory so
+# rdoc can reference it from here without the full pathname
+srcdir_base=$(notdir $(srcdir))
 rdoc: PHONY main
     @echo Generating RDoc documentation
-    $(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --encoding=UTF-8 --no-force-update --all --ri --op "$(RDOCOUT)" $(RDOCFLAGS) "$(srcdir)"
+    if [ ! -e $(srcdir_base) ]; then \
+        /usr/bin/ln -s $(srcdir); \
+    fi
+    $(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --encoding=UTF-8 --no-force-update --all --ri --op "$(RDOCOUT)" $(RDOCFLAGS) "$(srcdir_base)"
 
 rdoc-coverage: PHONY main
     @echo Generating RDoc coverage report