generate_notice.py: fix SPDX confusion.

The two-line copyright header style that looks like

  // Copyright (C) 2025 The Android Open Source Project
  // SPDX-License-Identifier: BSD-2-Clause

confuses the existing logic. Rather than try to deal with arbitrary
combinations from other projects, for now just ignore code we wrote
ourselves as already covered. So far the BSDs seem to be using SPDX in
addition to their existing copyright headers anyway, rather than as a
shorter alternative. And new code seems likely to come from llvm-libc
instead.

(Re-running the script also removes a now-obsolete entry from the recent
reallocarr.c removal --- "edits made in Cider don't run the upload
hooks" is a separate and much harder problem...)

Change-Id: Ib8d66572094bcc8328814cfefa57a6d753f11576
diff --git a/libc/tools/generate_notice.py b/libc/tools/generate_notice.py
index c998e32..034a3b3 100755
--- a/libc/tools/generate_notice.py
+++ b/libc/tools/generate_notice.py
@@ -151,6 +151,12 @@
              (path, len(lines)))
         return
 
+    # Skip over our own files if they're SPDX licensed.
+    # Because we use the // comment style, without this we'd copy the whole source file!
+    if re.compile('^// Copyright \(C\) 2\d\d\d The Android Open Source Project\n' + \
+                  '// SPDX-License-Identifier: ').match(content):
+        return
+
     # Manually iterate because extract_copyright_at tells us how many lines to
     # skip.
     i = 0