Commit 9ab6fc59 authored by Richard Levitte's avatar Richard Levitte
Browse files

Generate warning text



Now that we're using templates, we should warn people not to edit the
resulting file.  We do it through util/dofile.pl, which is enhanced
with an option to tell what file it was called from.  We also change
the calls so the template files are on the command line instead of
being redirected through standard input.  That way, we can display
something like this (example taken from include/openssl/opensslconf.h):

    /* WARNING: do not edit! */
    /* Generated by Configure from include/openssl/opensslconf.h.in */

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 52cdc997
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1752,7 +1752,7 @@ sub run_dofile()
    my $out = shift;

    # should we remove $out ?
    system("$config{perl} -I. -Mconfigdata util/dofile.pl <$in >$out.new");
    system("$config{perl} -I. -Mconfigdata util/dofile.pl -o\"Configure\" $in > $out.new");
    exit 1 if $? != 0;
    rename("$out.new", $out) || die "Can't rename $out.new, $!";
}
+1 −0
Original line number Diff line number Diff line
##
## Makefile for OpenSSL
##
## {- join("\n## ", @autowarntext) -}

VERSION={- $config{version} -}
MAJOR={- $config{major} -}
+2 −2
Original line number Diff line number Diff line
#!{- $config{perl} -}
#
# Wrapper around the ca to make it easier to use
# Edit CA.pl.in not CA.pl!

#
# {- join("\n# ", @autowarntext) -}

use strict;
use warnings;
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ progs.h: progs.pl Makefile
	$(RM) openssl.o

CA.pl: CA.pl.in
	$(PERL) -I$(TOP) -Mconfigdata $(TOP)/util/dofile.pl < CA.pl.in > CA.pl.new
	$(PERL) -I$(TOP) -Mconfigdata $(TOP)/util/dofile.pl -oapps/Makefile CA.pl.in > CA.pl.new
	mv CA.pl.new CA.pl


+1 −0
Original line number Diff line number Diff line
{- join("\n",map { "/* $_ */" } @autowarntext) -}
/* ====================================================================
 * Copyright (c) 2016 The OpenSSL Project.  All rights reserved.
 *
Loading