Makefile: Add SRCS list of all .c (and any .cc and .cpp) files
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Fri, 25 Jun 2021 06:25:12 +0000 (08:25 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Fri, 30 Sep 2022 20:25:45 +0000 (22:25 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/15913)

Configurations/unix-Makefile.tmpl

index 56ce7e98f7dcb87b6f84e377c1d63efee5d1fc76..c74d539f4a38f16ff91a72bea84dca7f8276a02e 100644 (file)
@@ -1306,6 +1306,14 @@ errors:
    }
    "";
 -}
+SRCS={-
+sub uniq { my %seen; grep !$seen{$_}++, @_; }
+sub flat(@) { return map { ref eq 'ARRAY' ? @$_ : $_ } @_; }
+join(" \\\n" . ' ' x 5, fill_lines(" ", $COLUMNS - 5,
+     uniq(grep /\.(c|cc|cpp)$/,
+          flat (map { $unified_info{sources}->{$_} }
+                (sort keys %{$unified_info{sources}})))))
+-}
 CRYPTOHEADERS={- join(" \\\n" . ' ' x 14,
                       fill_lines(" ", $COLUMNS - 14, sort keys %cryptoheaders)) -}
 SSLHEADERS={- join(" \\\n" . ' ' x 11,