Move gensseccomp and genfunctosyscallnrs next to their sources.

This is a manual refactoring to ensure that the modules respect package boundaries for input files.

Test: m gensseccomp genfunctosyscallnrs
Change-Id: I8ca6cbe85a50e41bfe874a899653c2309c59a822
diff --git a/libc/Android.bp b/libc/Android.bp
index 1bced2e..eea3924 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -2356,53 +2356,11 @@
     ],
 }
 
-// Generate the C++ policy sources for app and system seccomp-bpf filters.
-python_binary_host {
-    name: "genseccomp",
-    main: "tools/genseccomp.py",
-
-    srcs: [
-        "tools/genseccomp.py",
-        "tools/gensyscalls.py",
-    ],
-
-    data: [
-        "kernel/uapi/**/*.h",
-    ],
-
-    version: {
-        py2: {
-            enabled: true,
-        },
-        py3: {
-            enabled: false,
-        },
-    },
+filegroup {
+    name: "all_kernel_uapi_headers",
+    srcs: ["kernel/uapi/**/*.h"],
 }
 
-python_binary_host {
-    name: "genfunctosyscallnrs",
-    main: "tools/genfunctosyscallnrs.py",
-
-    srcs: [
-        "tools/genseccomp.py",
-        "tools/genfunctosyscallnrs.py",
-        "tools/gensyscalls.py",
-    ],
-
-    data: [
-        "kernel/uapi/**/*.h",
-    ],
-
-    version: {
-        py2: {
-            enabled: true,
-        },
-        py3: {
-            enabled: false,
-        },
-    },
-}
 
 cc_genrule {
     name: "func_to_syscall_nrs",
diff --git a/libc/tools/Android.bp b/libc/tools/Android.bp
index 13179a0..2efb8a6 100644
--- a/libc/tools/Android.bp
+++ b/libc/tools/Android.bp
@@ -2,3 +2,51 @@
     name: "bionic-gensyscalls",
     srcs: ["gensyscalls.py"]
 }
+
+// Generate the C++ policy sources for app and system seccomp-bpf filters.
+python_binary_host {
+    name: "genseccomp",
+    main: "genseccomp.py",
+
+    srcs: [
+        "genseccomp.py",
+        "gensyscalls.py",
+    ],
+
+    data: [
+        ":all_kernel_uapi_headers",
+    ],
+
+    version: {
+        py2: {
+            enabled: true,
+        },
+        py3: {
+            enabled: false,
+        },
+    },
+}
+
+python_binary_host {
+    name: "genfunctosyscallnrs",
+    main: "genfunctosyscallnrs.py",
+
+    srcs: [
+        "genseccomp.py",
+        "genfunctosyscallnrs.py",
+        "gensyscalls.py",
+    ],
+
+    data: [
+        ":all_kernel_uapi_headers",
+    ],
+
+    version: {
+        py2: {
+            enabled: true,
+        },
+        py3: {
+            enabled: false,
+        },
+    },
+}