In message <[EMAIL PROTECTED]> on Thu, 12 Dec 2002 16:50:37 
+0100 (MET), "OpenSSL-Bugs" <[EMAIL PROTECTED]> said:

rt> I have finally been able to debug the problem with make install_docs
rt> under DJGPP. Part of the problem relates to lack of symbolic links.
rt> The other has to do with filenames with different case actually
rt> referring to the same file (i.e. hmac.3 and HMAC.3 are the same file
rt> on a DOS/Windows system). This patch should fix the problem and allow
rt> the documentation to be installed. The only drawback is that man
rt> files with names identical to the original except for case will no
rt> longer be linked. For example, it no longer makes a link of HMAC.3 to
rt> hmac.3. I hope that the regex construction "\>" is portable and not a
rt> GNU extension. If it isn't portable, then "$$fn\>" probably needs to be
rt> changed to something like "$$fn[^a-z_]*".


I believe that it's quite dangerous to assume -i on Unixly systems,
entirely depending on the order in which the names come up.  Also, the
thing to grep for is the full name, so instead of \>, one can use \$.
Finally, on Unixly systems, I really want the softlinks to just have
the file name as value, not the full path.

I made the attached change, please test it and see if that satisfies
your needs.  And also, if you have the inclination, a test on Cygwin
would be a good thing (does Cygwin have entirely case-sensitive file
names or not?).

-- 
Richard Levitte         [EMAIL PROTECTED]
OpenSSL Project         http://www.openssl.org/~levitte/
Index: Makefile.org
===================================================================
RCS file: /e/openssl/cvs/openssl/Makefile.org,v
retrieving revision 1.154.2.36
diff -u -u -r1.154.2.36 Makefile.org
--- Makefile.org        6 Dec 2002 08:43:59 -0000       1.154.2.36
+++ Makefile.org        13 Dec 2002 14:39:52 -0000
@@ -769,6 +769,11 @@
                $(INSTALL_PREFIX)$(MANDIR)/man5 \
                $(INSTALL_PREFIX)$(MANDIR)/man7
        @pod2man="`cd util; ./pod2mantest $(PERL)`"; \
+       here="`pwd`"; \
+       filecase=; \
+       if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" ]; then \
+               filecase=-i; \
+       fi; \
        for i in doc/apps/*.pod; do \
                fn=`basename $$i .pod`; \
                if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
@@ -778,10 +783,12 @@
                        --section=$$sec --center=OpenSSL \
                        --release=$(VERSION) `basename $$i`") \
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
-               $(PERL) util/extract-names.pl < $$i | grep -v "^$$fn" | \
-                       while read n; do \
-                               util/point.sh $$fn.$$sec 
$(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$n.$$sec; \
-                       done; \
+               $(PERL) util/extract-names.pl < $$i | \
+                       grep -v $$filecase "^$$fn\$$" | \
+                       (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
+                        while read n; do \
+                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
+                        done); \
        done; \
        for i in doc/crypto/*.pod doc/ssl/*.pod; do \
                fn=`basename $$i .pod`; \
@@ -792,10 +799,12 @@
                        --section=$$sec --center=OpenSSL \
                        --release=$(VERSION) `basename $$i`") \
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
-               $(PERL) util/extract-names.pl < $$i | grep -v "^$$fn" | \
-                       while read n; do \
-                               util/point.sh $$fn.$$sec 
$(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$n.$$sec; \
-                       done; \
+               $(PERL) util/extract-names.pl < $$i | \
+                       grep -v $$filecase "^$$fn\$$" | \
+                       (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
+                        while read n; do \
+                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
+                        done); \
        done
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.

Reply via email to