From 67e0735f66971635508d9ab3f07e8b05a95491d5 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 25 Jun 2021 08:25:12 +0200 Subject: [PATCH] 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) --- Configurations/unix-Makefile.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 56ce7e98f7..c74d539f4a 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, -- GitLab