common0.tmpl 1.3 KB

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