[openssl.org #1121] [patch 0.9.8-beta5] make depend fails if bn_prime.h does not exist

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[openssl.org #1121] [patch 0.9.8-beta5] make depend fails if bn_prime.h does not exist

Rich Salz via RT

This is a report based on openssl-0.9.8-beta5, built on Fedora Core 1.

bn_prime.h is a derived file.  Therefore, I believe that "make depend"
should not require it to exist.  Yet, if crypto/bn/bn_prime.h does not
exist, "make depend" fails -- it builds crypto/bn/Makefile without
references to bn_prime.o -- not very useful.

The solution is to have crypto/bn/Makefile create a dummy version of the
file crypto/bn/bn_prime.h, and then get rid of it after the make depend
finishes.  This is similar to actions taken for other header files that
are built by "make all".  Here is a tested patch that accomplishes this

--- crypto/bn/Makefile~ 2005-06-19 20:23:32.000000000 -0400
+++ crypto/bn/Makefile  2005-06-19 20:26:32.000000000 -0400
@@ -139,7 +139,9 @@
        @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
+       [ -z "$(THIS)" -o -f bn_prime.h ] || touch bn_prime.h # fake
bn_prime.h if it does not exist
+       [ -z "$(THIS)" -o -s bn_prime.h ] || rm bn_prime.h
        $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print;
exit(0);}' $(MAKEFILE) >Makefile.new
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]