xref: /freebsd/crypto/openssl/Configurations/common0.tmpl (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1*e0c4386eSCy Schubert{- # -*- Mode: perl -*-
2*e0c4386eSCy Schubert
3*e0c4386eSCy Schubert # Commonly used list of generated files
4*e0c4386eSCy Schubert # The reason for the complexity is that the build.info files provide
5*e0c4386eSCy Schubert # GENERATE rules for *all* platforms without discrimination, while the
6*e0c4386eSCy Schubert # build files only want those for a particular build.  Therefore, we
7*e0c4386eSCy Schubert # need to extrapolate exactly what we need to generate.  The way to do
8*e0c4386eSCy Schubert # that is to extract all possible source files from diverse tables and
9*e0c4386eSCy Schubert # filter out all that are not generated
10*e0c4386eSCy Schubert my %generatables =
11*e0c4386eSCy Schubert     map { $_ => 1 }
12*e0c4386eSCy Schubert     ( # The sources of stuff may be generated
13*e0c4386eSCy Schubert         ( map { @{$unified_info{sources}->{$_}} }
14*e0c4386eSCy Schubert               keys %{$unified_info{sources}} ),
15*e0c4386eSCy Schubert         $disabled{shared}
16*e0c4386eSCy Schubert             ? ()
17*e0c4386eSCy Schubert             : ( map { @{$unified_info{shared_sources}->{$_}} }
18*e0c4386eSCy Schubert                 keys %{$unified_info{shared_sources}} ),
19*e0c4386eSCy Schubert         # Things we explicitly depend on are usually generated
20*e0c4386eSCy Schubert         ( map { $_ eq "" ? () : @{$unified_info{depends}->{$_}} }
21*e0c4386eSCy Schubert               keys %{$unified_info{depends}} ));
22*e0c4386eSCy Schubert our @generated =
23*e0c4386eSCy Schubert     sort ( ( grep { defined $unified_info{generate}->{$_} }
24*e0c4386eSCy Schubert              sort keys %generatables ),
25*e0c4386eSCy Schubert            # Scripts are assumed to be generated, so add them too
26*e0c4386eSCy Schubert            ( grep { defined $unified_info{sources}->{$_} }
27*e0c4386eSCy Schubert              @{$unified_info{scripts}} ) );
28*e0c4386eSCy Schubert
29*e0c4386eSCy Schubert # Avoid strange output
30*e0c4386eSCy Schubert "";
31*e0c4386eSCy Schubert-}
32