Always use buildinf.h, which now includes the mk1mfinf.h data.
authorBodo Möller <bodo@openssl.org>
Thu, 29 Jul 1999 12:57:23 +0000 (12:57 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 29 Jul 1999 12:57:23 +0000 (12:57 +0000)
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.

CHANGES
Configure
crypto/.cvsignore
crypto/Makefile.ssl
crypto/cversion.c
util/mk1mf.pl

diff --git a/CHANGES b/CHANGES
index 4f516ffd5d1e43d98216ba09299f0fbe59e7c51b..8ae1483db4ece0de2140ea0ce391c3d5403e854c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -46,9 +46,8 @@
      (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused
      problems not only on Windows, but also on some Unix platforms.
      To avoid problematic command lines, these definitions are now in an
      (both in crypto/Makefile.ssl for use by crypto/cversion.c) caused
      problems not only on Windows, but also on some Unix platforms.
      To avoid problematic command lines, these definitions are now in an
-     auto-generated file, which also defines DATE and thus replaces
-     crypto/date.h.  Standard "make" builds use crypto/buildinf.h,
-     mk1mf.pl builds use crypto/mk1mfinf.h (created by mk1mf.pl).
+     auto-generated file crypto/buildinf.h (created by crypto/Makefile.ssl
+     for standard "make" builds, by util/mk1mf.pl for "mk1mf" builds).
      [Bodo Moeller]
 
   *) MIPS III/IV assembler module is reimplemented.
      [Bodo Moeller]
 
   *) MIPS III/IV assembler module is reimplemented.
index fbac48e3997c5d370f07ca7b2543e616acd882fd..30927aeed7bca6f60b33e9e6dcb4f4f35d5f02c9 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -708,13 +708,14 @@ print "BF_PTR2 used\n" if $bf_ptr == 2;
 if($IsWindows) {
        open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h";
        printf OUT <<EOF;
 if($IsWindows) {
        open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h";
        printf OUT <<EOF;
-/* auto-generated by Configure for crypto/cversion.c */
-/* (Unix builds: auto-generated by crypto/Makefile.ssl) */
-/* mk1mf builds use mk1mfinf.h instead, so this file is probably never needed */
-#define CFLAGS "$cc $cflags"
-#define PLATFORM "$target"
+#ifndef MK1MF_BUILD
+  /* auto-generated by Configure for crypto/cversion.c:
+   * for Unix builds, crypto/Makefile.ssl generates functional definitions;
+   * Windows builds (and other mk1mf builds) compile cversion.c with
+   * -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);
 
        system "perl crypto/objects/obj_dat.pl <crypto/objects/objects.h >crypto/objects/obj_dat.h";
        close(OUT);
 
        system "perl crypto/objects/obj_dat.pl <crypto/objects/objects.h >crypto/objects/obj_dat.h";
index b8d2cb1da2b6a746013a08d0cf129c7a44d5b529..6b86a0a8dc492e7389596eb8ee91890fd018850d 100644 (file)
@@ -1,5 +1,4 @@
 lib
 buildinf.h
 lib
 buildinf.h
-mk1mfinf.h
 opensslconf.h
 Makefile.save
 opensslconf.h
 Makefile.save
index c27a69d5e1e47c05f969b77f03eea84efb6c87e7..930dd02a9b3cb616f4a8c3a8f853c6ba273d3868 100644 (file)
@@ -50,11 +50,12 @@ top:
 all: buildinf.h lib subdirs
 
 buildinf.h: ../Makefile.ssl
 all: buildinf.h lib subdirs
 
 buildinf.h: ../Makefile.ssl
-       ( echo "/* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
-       echo "/* (mk1mf builds use mk1mfinf.h instead) */"; \
-       echo "#define CFLAGS \"$(CC) $(CFLAG)\""; \
-       echo "#define PLATFORM \"$(PLATFORM)\""; \
-       echo "#define DATE \"`date`\"" ) >buildinf.h
+       ( echo "#ifndef MK1MF_BUILD"; \
+       echo "  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
+       echo "  #define CFLAGS \"$(CC) $(CFLAG)\""; \
+       echo "  #define PLATFORM \"$(PLATFORM)\""; \
+       echo "  #define DATE \"`date`\""; \
+       echo "#endif" ) >buildinf.h
 
 subdirs:
        @for i in $(SDIRS) ;\
 
 subdirs:
        @for i in $(SDIRS) ;\
@@ -129,7 +130,7 @@ depend:
        done;
 
 clean:
        done;
 
 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) ;\
        do \
        (cd $$i; echo "making clean in crypto/$$i..."; \
        @for i in $(SDIRS) ;\
        do \
        (cd $$i; echo "making clean in crypto/$$i..."; \
index 428def308136645b97550bd0593da281bf270080..297f8843f58586803ea450af2e1be417186bbbc4 100644 (file)
 #include "cryptlib.h"
 #include <openssl/crypto.h>
 
 #include "cryptlib.h"
 #include <openssl/crypto.h>
 
-#ifdef MK1MF_BUILD
-# include "mk1mfinf.h"
-#else
-# include "buildinf.h"
-#endif
+#include "buildinf.h"
 
 const char *SSLeay_version(int t)
        {
 
 const char *SSLeay_version(int t)
        {
index e4596bebb201a7c3eccbd38a5a65ddcc6489a493..f3f17074f418792d3c24d5545ded88c49903110a 100755 (executable)
@@ -404,11 +404,11 @@ EOF
     
 my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
 $platform_cpp_symbol =~ s/-/_/;
     
 my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
 $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>)
                {
                if (/^\#ifdef $platform_cpp_symbol$/)
        while (<IN>)
                {
                if (/^\#ifdef $platform_cpp_symbol$/)
@@ -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";
-       print OUT $old_mk1mfinf_h;
+       open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.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;
 #ifdef $platform_cpp_symbol
 printf OUT <<EOF;
 #ifdef $platform_cpp_symbol
-  /* auto-generated and updated by util/mk1mf.pl for crypto/cversion.c */
-  /* (used in place of crypto/buildinf.h by mk1mf builds) */
+  /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
   #define CFLAGS "$cc $cflags"
   #define PLATFORM "$platform"
 EOF
   #define CFLAGS "$cc $cflags"
   #define PLATFORM "$platform"
 EOF