mirror of https://github.com/openssl/openssl
Unified - Add the build.info command OVERRIDE, to avoid build file clashes
Should it be needed because the recipes within a RAW section might clash with those generated by Configure, it's possible to tell it not to generate them with the use of OVERRIDES, for example: SOURCE[libfoo]=foo.c bar.c OVERRIDES=bar.o BEGINRAW[Makefile(unix)] bar.o: bar.c $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $< ENDRAW[Makefile(unix)] Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
66ddf178b4
commit
8a67946e5b
|
@ -404,6 +404,18 @@ configuration items:
|
||||||
build hoho.h: echo "/* hoho */" > hoho.h
|
build hoho.h: echo "/* hoho */" > hoho.h
|
||||||
ENDRAW[build.ninja(unix)]
|
ENDRAW[build.ninja(unix)]
|
||||||
|
|
||||||
|
Should it be needed because the recipes within a RAW section might
|
||||||
|
clash with those generated by Configure, it's possible to tell it
|
||||||
|
not to generate them with the use of OVERRIDES, for example:
|
||||||
|
|
||||||
|
SOURCE[libfoo]=foo.c bar.c
|
||||||
|
|
||||||
|
OVERRIDES=bar.o
|
||||||
|
BEGINRAW[Makefile(unix)]
|
||||||
|
bar.o: bar.c
|
||||||
|
$(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
|
||||||
|
ENDRAW[Makefile(unix)]
|
||||||
|
|
||||||
See the documentation further up for more information on configuration
|
See the documentation further up for more information on configuration
|
||||||
items.
|
items.
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,9 @@
|
||||||
$cache{$script} = 1;
|
$cache{$script} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Start with populating the cache with all the overrides
|
||||||
|
%cache = map { $_ => 1 } @{$unified_info{overrides}};
|
||||||
|
|
||||||
# Build all known libraries, engines, programs and scripts.
|
# Build all known libraries, engines, programs and scripts.
|
||||||
# Everything else will be handled as a consequence.
|
# Everything else will be handled as a consequence.
|
||||||
map { dolib($_) } @{$unified_info{libraries}};
|
map { dolib($_) } @{$unified_info{libraries}};
|
||||||
|
|
11
Configure
11
Configure
|
@ -1274,6 +1274,7 @@ if ($builder eq "unified") {
|
||||||
my @engines = ();
|
my @engines = ();
|
||||||
my @scripts = ();
|
my @scripts = ();
|
||||||
my @extra = ();
|
my @extra = ();
|
||||||
|
my @overrides = ();
|
||||||
my @intermediates = ();
|
my @intermediates = ();
|
||||||
my @rawlines = ();
|
my @rawlines = ();
|
||||||
|
|
||||||
|
@ -1342,6 +1343,9 @@ if ($builder eq "unified") {
|
||||||
qr/^\s*EXTRA\s*=\s*(.*)\s*$/
|
qr/^\s*EXTRA\s*=\s*(.*)\s*$/
|
||||||
=> sub { push @extra, split(/\s+/, $1)
|
=> sub { push @extra, split(/\s+/, $1)
|
||||||
if !@skip || $skip[$#skip] > 0 },
|
if !@skip || $skip[$#skip] > 0 },
|
||||||
|
qr/^\s*OVERRIDES\s*=\s*(.*)\s*$/
|
||||||
|
=> sub { push @overrides, split(/\s+/, $1)
|
||||||
|
if !@skip || $skip[$#skip] > 0 },
|
||||||
|
|
||||||
qr/^\s*ORDINALS\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/,
|
qr/^\s*ORDINALS\[((?:\\.|[^\\\]])+)\]\s*=\s*(.*)\s*$/,
|
||||||
=> sub { push @{$ordinals{$1}}, split(/\s+/, $2)
|
=> sub { push @{$ordinals{$1}}, split(/\s+/, $2)
|
||||||
|
@ -1440,6 +1444,11 @@ EOF
|
||||||
$unified_info{extra}->{$extra} = 1;
|
$unified_info{extra}->{$extra} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (@overrides) {
|
||||||
|
my $override = cleanfile($buildd, $_, $blddir);
|
||||||
|
$unified_info{overrides}->{$override} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
push @{$unified_info{rawlines}}, @rawlines;
|
push @{$unified_info{rawlines}}, @rawlines;
|
||||||
|
|
||||||
unless ($disabled{shared}) {
|
unless ($disabled{shared}) {
|
||||||
|
@ -1583,7 +1592,7 @@ EOF
|
||||||
|
|
||||||
### Make unified_info a bit more efficient
|
### Make unified_info a bit more efficient
|
||||||
# One level structures
|
# One level structures
|
||||||
foreach (("programs", "libraries", "engines", "scripts", "extra")) {
|
foreach (("programs", "libraries", "engines", "scripts", "extra", "overrides")) {
|
||||||
$unified_info{$_} = [ sort keys %{$unified_info{$_}} ];
|
$unified_info{$_} = [ sort keys %{$unified_info{$_}} ];
|
||||||
}
|
}
|
||||||
# Two level structures
|
# Two level structures
|
||||||
|
|
Loading…
Reference in New Issue