From: Dr. David von Oheimb Date: Fri, 25 Jun 2021 06:25:12 +0000 (+0200) Subject: Makefile: Add SRCS list of all .c (and any .cc and .cpp) files X-Git-Tag: openssl-3.2.0-alpha1~1989 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67e0735f66971635508d9ab3f07e8b05a95491d5;p=thirdparty%2Fopenssl.git Makefile: Add SRCS list of all .c (and any .cc and .cpp) files Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/15913) --- diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 56ce7e98f7d..c74d539f4a3 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -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,