Reformat the CFLAG string so it can be made part of a C string.
authorRichard Levitte <levitte@openssl.org>
Thu, 30 May 2002 18:06:35 +0000 (18:06 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 30 May 2002 18:06:35 +0000 (18:06 +0000)
Incidently, this works pretty well on the command line as well.
PR: 52

Configure
crypto/Makefile.ssl

index 2a8b2251d79129b25a52449e2edaf3049c1167e1..8fe14d8a41dd025a4e23b8cfba5478cdaf79ce52 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1124,6 +1124,10 @@ if ($rmd160_obj =~ /\.o$/)
        $cflags.=" -DRMD160_ASM";
        }
 
        $cflags.=" -DRMD160_ASM";
        }
 
+# "Stringify" the C flags string.  This permits it to be made part of a string
+# and works as well on command lines.
+$cflags =~ s/([\\\"])/\\\1/g;
+
 my $version = "unknown";
 my $major = "unknown";
 my $minor = "unknown";
 my $version = "unknown";
 my $major = "unknown";
 my $minor = "unknown";
index 2ef333ef8b3bfddf24a46869305a3c7bce4ee42d..98685800e4a8451806a025c580ab8514d4c652d5 100644 (file)
@@ -54,11 +54,11 @@ all: buildinf.h lib subdirs shared
 
 buildinf.h: ../Makefile.ssl
        ( echo "#ifndef MK1MF_BUILD"; \
 
 buildinf.h: ../Makefile.ssl
        ( 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 '  /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
+       echo '  #define CFLAGS "$(CC) $(CFLAG)"'; \
+       echo '  #define PLATFORM "$(PLATFORM)"'; \
        echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
        echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
-       echo "#endif" ) >buildinf.h
+       echo '#endif' ) >buildinf.h
 
 testapps:
        if echo ${SDIRS} | fgrep ' des '; \
 
 testapps:
        if echo ${SDIRS} | fgrep ' des '; \