Fix documentation generation on Windows.

Previously doc/doc.css was a symlink to util/doc.css, but symlinks
don't work well on Windows. Now util/doc.css is copied to the output
directory when the documentation is generated.

Change-Id: I2c9f4fee4f4307cc3dd70c4be380b4551d5e9ab5
Reviewed-on: https://boringssl-review.googlesource.com/5677
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/.gitignore b/.gitignore
index b54125f..a2e3ed2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 *.swp
 *.swo
 doc/*.html
+doc/doc.css
diff --git a/doc/doc.css b/doc/doc.css
deleted file mode 120000
index d7c5102..0000000
--- a/doc/doc.css
+++ /dev/null
@@ -1 +0,0 @@
-../util/doc.css
\ No newline at end of file
diff --git a/util/doc.go b/util/doc.go
index 540d6ca..0ab6f89 100644
--- a/util/doc.go
+++ b/util/doc.go
@@ -605,6 +605,14 @@
 	return nil
 }
 
+func copyFile(outPath string, inFilePath string) error {
+	bytes, err := ioutil.ReadFile(inFilePath)
+	if err != nil {
+		return err
+	}
+	return ioutil.WriteFile(filepath.Join(outPath, filepath.Base(inFilePath)), bytes, 0666)
+}
+
 func main() {
 	var (
 		configFlag *string = flag.String("config", "doc.config", "Location of config file")
@@ -645,4 +653,9 @@
 		fmt.Printf("Failed to generate index: %s\n", err)
 		os.Exit(1)
 	}
+
+	if err := copyFile(*outputDir, "doc.css"); err != nil {
+		fmt.Printf("Failed to copy static file: %s\n", err)
+		os.Exit(1)
+	}
 }