ui: Don't always re-symlink node_modules

We symlink node_modules into out/blah/ui.
This action depended on ui/node_modules/.
Unfortunately npm install (on Linux only) touches ui/node_modules
causing us to re-symlink every time which in turn causes us to npm
install every time which puts us back on square one.

Probably installing node_modules should not happen in the build path but
for now the quick fix is to not have the symlink depend on ui/node_modules.

Change-Id: I20181aa6b077c304416081bc2332777e98cc3bea
diff --git a/ui/BUILD.gn b/ui/BUILD.gn
index 960f426..4262341 100644
--- a/ui/BUILD.gn
+++ b/ui/BUILD.gn
@@ -232,23 +232,24 @@
   deps = [
     ":check_node_exists",
   ]
-  inputs = [
-    "node_modules",
-  ]
-  outputs = [
-    "$target_out_dir/node_modules",
-  ]
+
   script = "../gn/standalone/build_tool_wrapper.py"
+  stamp_file = "$target_out_dir/.$target_name.stamp"
   args = [
+    "--stamp",
+    rebase_path(stamp_file, root_build_dir),
     "/bin/ln",
     "-fns",
-    rebase_path(inputs[0], target_out_dir),
-    rebase_path(outputs[0], root_build_dir),
+    rebase_path("node_modules", root_build_dir),
+    rebase_path("$target_out_dir/node_modules", root_build_dir),
+  ]
+  outputs = [
+    stamp_file,
   ]
 }
 
 # Runs npm install.
-action("node_modules") {
+action("node_modules_install") {
   script = "../gn/standalone/build_tool_wrapper.py"
   stamp_file = "$target_out_dir/.$target_name.stamp"
   args = [
@@ -272,7 +273,11 @@
   outputs = [
     stamp_file,
   ]
+}
+
+group("node_modules") {
   deps = [
+    ":node_modules_install",
     ":node_modules_symlink",
   ]
 }