Make build.ninja.in independent of the build dir.

This change makes the module definition location that's included in the build
manifest comments use paths relative to the top-level source directory.  This
should make the bootstrap build manifest not get regenerated when using a new
build directory.

Change-Id: I350562ad10aa52688c8841c96c6325502b0faa59
diff --git a/blueprint/context.go b/blueprint/context.go
index 5af899f..d8e6620 100644
--- a/blueprint/context.go
+++ b/blueprint/context.go
@@ -1195,11 +1195,18 @@
 
 	for _, info := range c.moduleInfo {
 		buf.Reset()
+
+		// In order to make the bootstrap build manifest independent of the
+		// build dir we need to output the Blueprints file locations in the
+		// comments as paths relative to the source directory.
+		relPos := info.pos
+		relPos.Filename = info.relBlueprintFile
+
 		infoMap := map[string]interface{}{
 			"properties": info.properties,
 			"typeName":   info.typeName,
 			"goTypeName": info.typ.name(),
-			"pos":        info.pos,
+			"pos":        relPos,
 		}
 		err = headerTemplate.Execute(buf, infoMap)
 		if err != nil {
diff --git a/build.ninja.in b/build.ninja.in
index b7983ab..4857325 100644
--- a/build.ninja.in
+++ b/build.ninja.in
@@ -58,7 +58,7 @@
 # Module:  blueprint
 # Type:    bootstrap_go_package
 # GoType:  blueprint/bootstrap.goPackageModule
-# Defined: ../Blueprints:1:1
+# Defined: Blueprints:1:1
 
 build bootstrap/blueprint/obj/_go_.${g.bootstrap.GoChar}: g.bootstrap.gc $
         ${g.bootstrap.SrcDir}/blueprint/context.go $
@@ -84,7 +84,7 @@
 # Module:  blueprint-parser
 # Type:    bootstrap_go_package
 # GoType:  blueprint/bootstrap.goPackageModule
-# Defined: ../Blueprints:18:1
+# Defined: Blueprints:18:1
 
 build bootstrap/blueprint-parser/obj/_go_.${g.bootstrap.GoChar}: $
         g.bootstrap.gc ${g.bootstrap.SrcDir}/blueprint/parser/parser.go
@@ -98,7 +98,7 @@
 # Module:  blueprint-bootstrap
 # Type:    bootstrap_go_package
 # GoType:  blueprint/bootstrap.goPackageModule
-# Defined: ../Blueprints:24:1
+# Defined: Blueprints:24:1
 
 build bootstrap/blueprint-bootstrap/obj/_go_.${g.bootstrap.GoChar}: $
         g.bootstrap.gc ${g.bootstrap.SrcDir}/blueprint/bootstrap/bootstrap.go $
@@ -119,7 +119,7 @@
 # Module:  minibp
 # Type:    bootstrap_go_binary
 # GoType:  blueprint/bootstrap.goBinaryModule
-# Defined: ../Blueprints:34:1
+# Defined: Blueprints:34:1
 
 build bootstrap/minibp/obj/_go_.${g.bootstrap.GoChar}: g.bootstrap.gc $
         ${g.bootstrap.SrcDir}/blueprint/bootstrap/minibp/main.go | $