提交 57119943 编写于 作者: B Bodo Möller

Always use buildinf.h, which now includes the mk1mfinf.h data.

Using different files caused problems because the dependencies
in the Makefiles produced by mk1mf.pl were for the standard case,
i.e. mentioned buildinf.h and not mk1mfinf.h.
上级 37b7185b
...@@ -46,9 +46,8 @@ ...@@ -46,9 +46,8 @@
(both in crypto/Makefile.ssl for use by crypto/cversion.c) caused (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused
problems not only on Windows, but also on some Unix platforms. problems not only on Windows, but also on some Unix platforms.
To avoid problematic command lines, these definitions are now in an To avoid problematic command lines, these definitions are now in an
auto-generated file, which also defines DATE and thus replaces auto-generated file crypto/buildinf.h (created by crypto/Makefile.ssl
crypto/date.h. Standard "make" builds use crypto/buildinf.h, for standard "make" builds, by util/mk1mf.pl for "mk1mf" builds).
mk1mf.pl builds use crypto/mk1mfinf.h (created by mk1mf.pl).
[Bodo Moeller] [Bodo Moeller]
*) MIPS III/IV assembler module is reimplemented. *) MIPS III/IV assembler module is reimplemented.
......
...@@ -708,13 +708,14 @@ print "BF_PTR2 used\n" if $bf_ptr == 2; ...@@ -708,13 +708,14 @@ print "BF_PTR2 used\n" if $bf_ptr == 2;
if($IsWindows) { if($IsWindows) {
open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h";
printf OUT <<EOF; printf OUT <<EOF;
/* auto-generated by Configure for crypto/cversion.c */ #ifndef MK1MF_BUILD
/* (Unix builds: auto-generated by crypto/Makefile.ssl) */ /* auto-generated by Configure for crypto/cversion.c:
/* mk1mf builds use mk1mfinf.h instead, so this file is probably never needed */ * for Unix builds, crypto/Makefile.ssl generates functional definitions;
#define CFLAGS "$cc $cflags" * Windows builds (and other mk1mf builds) compile cversion.c with
#define PLATFORM "$target" * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
#error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles"
#endif
EOF EOF
printf OUT "#define DATE \"%s\"\n", scalar gmtime();
close(OUT); close(OUT);
system "perl crypto/objects/obj_dat.pl <crypto/objects/objects.h >crypto/objects/obj_dat.h"; system "perl crypto/objects/obj_dat.pl <crypto/objects/objects.h >crypto/objects/obj_dat.h";
......
lib lib
buildinf.h buildinf.h
mk1mfinf.h
opensslconf.h opensslconf.h
Makefile.save Makefile.save
...@@ -50,11 +50,12 @@ top: ...@@ -50,11 +50,12 @@ top:
all: buildinf.h lib subdirs all: buildinf.h lib subdirs
buildinf.h: ../Makefile.ssl buildinf.h: ../Makefile.ssl
( echo "/* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ ( echo "#ifndef MK1MF_BUILD"; \
echo "/* (mk1mf builds use mk1mfinf.h instead) */"; \ echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
echo "#define CFLAGS \"$(CC) $(CFLAG)\""; \ echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
echo "#define PLATFORM \"$(PLATFORM)\""; \ echo " #define PLATFORM \"$(PLATFORM)\""; \
echo "#define DATE \"`date`\"" ) >buildinf.h echo " #define DATE \"`date`\""; \
echo "#endif" ) >buildinf.h
subdirs: subdirs:
@for i in $(SDIRS) ;\ @for i in $(SDIRS) ;\
...@@ -129,7 +130,7 @@ depend: ...@@ -129,7 +130,7 @@ depend:
done; done;
clean: clean:
rm -f buildinf.h mk1mfinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
@for i in $(SDIRS) ;\ @for i in $(SDIRS) ;\
do \ do \
(cd $$i; echo "making clean in crypto/$$i..."; \ (cd $$i; echo "making clean in crypto/$$i..."; \
......
...@@ -61,11 +61,7 @@ ...@@ -61,11 +61,7 @@
#include "cryptlib.h" #include "cryptlib.h"
#include <openssl/crypto.h> #include <openssl/crypto.h>
#ifdef MK1MF_BUILD #include "buildinf.h"
# include "mk1mfinf.h"
#else
# include "buildinf.h"
#endif
const char *SSLeay_version(int t) const char *SSLeay_version(int t)
{ {
......
...@@ -404,11 +404,11 @@ EOF ...@@ -404,11 +404,11 @@ EOF
my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform"; my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
$platform_cpp_symbol =~ s/-/_/; $platform_cpp_symbol =~ s/-/_/;
if (open(IN,"crypto/mk1mfinf.h")) if (open(IN,"crypto/buildinf.h"))
{ {
# Remove entry for this platform in existing file mk1mfinf.h. # Remove entry for this platform in existing file buildinf.h.
my $old_mk1mfinf_h = ""; my $old_buildinf_h = "";
while (<IN>) while (<IN>)
{ {
if (/^\#ifdef $platform_cpp_symbol$/) if (/^\#ifdef $platform_cpp_symbol$/)
...@@ -417,21 +417,20 @@ if (open(IN,"crypto/mk1mfinf.h")) ...@@ -417,21 +417,20 @@ if (open(IN,"crypto/mk1mfinf.h"))
} }
else else
{ {
$old_mk1mfinf_h .= $_; $old_buildinf_h .= $_;
} }
} }
close(IN); close(IN);
open(OUT,">crypto/mk1mfinf.h") || die "Can't open mk1mfinf.h"; open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.h";
print OUT $old_mk1mfinf_h; print OUT $old_buildinf_h;
close(OUT); close(OUT);
} }
open (OUT,">>crypto/mk1mfinf.h") || die "Can't open mk1mfinf.h"; open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h";
printf OUT <<EOF; printf OUT <<EOF;
#ifdef $platform_cpp_symbol #ifdef $platform_cpp_symbol
/* auto-generated and updated by util/mk1mf.pl for crypto/cversion.c */ /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
/* (used in place of crypto/buildinf.h by mk1mf builds) */
#define CFLAGS "$cc $cflags" #define CFLAGS "$cc $cflags"
#define PLATFORM "$platform" #define PLATFORM "$platform"
EOF EOF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册