Bug 974281: Move the generated Visual Studio solution out of the obj directory. draft
authorBob Owen <bobowencode@gmail.com>
Wed, 04 May 2016 11:49:59 +0100
changeset 363250 cf9bc877711843daba52a392dbb6f58bfd71e8d9
parent 357771 8c3fd523d75bd30f691ca2d6cfdad18d576392a1
child 363251 da016d7670c2288fd605634c36cffe08ab0068f8
push id17155
push userbobowencode@gmail.com
push dateWed, 04 May 2016 11:47:15 +0000
bugs974281
milestone49.0a1
Bug 974281: Move the generated Visual Studio solution out of the obj directory. Also changing the directory name to .msvc, so it's easier to see it isn't part of the tracked files. .msvc has been ignored for hg and git. MozReview-Commit-ID: JB1184FwNeh
.gitignore
.hgignore
python/mozbuild/mozbuild/backend/visualstudio.py
--- a/.gitignore
+++ b/.gitignore
@@ -53,16 +53,19 @@ js/src/tests/results-*.txt
 parser/html/java/htmlparser/
 parser/html/java/javaparser/
 
 # Ignore the files and directory that Eclipse IDE creates
 .project
 .cproject
 .settings/
 
+# Ignore generated Visual Studio solution folder
+/.msvc/
+
 # Ignore the files and directory that JetBrains IDEs create.
 /.idea/
 *.iml
 
 # Gradle cache.
 /.gradle/
 
 # Local Gradle configuration properties.
--- a/.hgignore
+++ b/.hgignore
@@ -50,16 +50,19 @@
 # SVN directories
 \.svn/
 
 # Ignore the files and directory that Eclipse IDE creates
 \.project$
 \.cproject$
 \.settings/
 
+# Ignore generated Visual Studio solution folder
+^\.msvc/
+
 # Ignore the files and directory that JetBrains IDEs create.
 \.idea/
 \.iml$
 
 # Gradle cache.
 ^.gradle/
 
 # Local Gradle configuration properties.
--- a/python/mozbuild/mozbuild/backend/visualstudio.py
+++ b/python/mozbuild/mozbuild/backend/visualstudio.py
@@ -88,17 +88,20 @@ class VisualStudioBackend(CommonBackend)
     and self._write_file() currently opens files in text mode, which behaves
     oddly under MozillaBuild.
     """
 
     def _init(self):
         CommonBackend._init(self)
 
         # These should eventually evolve into parameters.
-        self._out_dir = os.path.join(self.environment.topobjdir, 'msvc')
+        self._out_dir = os.path.join(self.environment.topsrcdir, '.msvc',
+                                     os.path.relpath(self.environment.topobjdir,
+                                                     self.environment.topsrcdir))
+
         self._projsubdir = 'projects'
         # But making this one a parameter requires testing first.
         self._version = '2013'
 
         self._paths_to_sources = {}
         self._paths_to_includes = {}
         self._paths_to_defines = {}
         self._paths_to_configs = {}