Bug 842839: Some add-on SDK files use windows line endings. r=gps
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 19 Feb 2013 16:18:59 -0800
changeset 122405 18fa6e840300a79004c0c87108de235efffcc245
parent 122404 f5f3b3a8dc0cf28b6796b18a2b86adf7d1839b66
child 122406 6d504df6f023173832683178f62e25d6e894be4d
push id1369
push userttaubert@mozilla.com
push dateWed, 20 Feb 2013 14:37:16 +0000
treeherderfx-team@0bb9e8c676da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs842839
milestone22.0a1
Bug 842839: Some add-on SDK files use windows line endings. r=gps
addon-sdk/Makefile.in
addon-sdk/copy_source.py
addon-sdk/mach_commands.py
--- a/addon-sdk/Makefile.in
+++ b/addon-sdk/Makefile.in
@@ -1,36 +1,36 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(topsrcdir)/config/config.mk
-
-TEST_DIRS += test
-
-libs::
-	$(PYTHON) $(srcdir)/copy_source.py $(topsrcdir) $(srcdir)/source/lib $(FINAL_TARGET)/modules/commonjs >copy_source.mk
-	$(MAKE) -f copy_source.mk libs
-
-include $(topsrcdir)/config/rules.mk
-
-TEST_FILES = \
-  source/app-extension \
-  source/bin \
-  source/data \
-  source/python-lib \
-  source/test \
-  source/package.json \
-  source/mapping.json \
-  $(NULL)
-
-# Remove this once the test harness uses the APIs built into Firefox
-TEST_FILES += source/lib
-
-PKG_STAGE = $(DIST)/test-package-stage
-
-stage-tests-package:: $(TEST_FILES)
-	$(INSTALL) $^ $(PKG_STAGE)/jetpack
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEPTH     = @DEPTH@
+topsrcdir = @top_srcdir@
+srcdir    = @srcdir@
+VPATH     = @srcdir@
+
+include $(topsrcdir)/config/config.mk
+
+TEST_DIRS += test
+
+libs::
+	$(PYTHON) $(srcdir)/copy_source.py $(topsrcdir) $(srcdir)/source/lib $(FINAL_TARGET)/modules/commonjs >copy_source.mk
+	$(MAKE) -f copy_source.mk libs
+
+include $(topsrcdir)/config/rules.mk
+
+TEST_FILES = \
+  source/app-extension \
+  source/bin \
+  source/data \
+  source/python-lib \
+  source/test \
+  source/package.json \
+  source/mapping.json \
+  $(NULL)
+
+# Remove this once the test harness uses the APIs built into Firefox
+TEST_FILES += source/lib
+
+PKG_STAGE = $(DIST)/test-package-stage
+
+stage-tests-package:: $(TEST_FILES)
+	$(INSTALL) $^ $(PKG_STAGE)/jetpack
--- a/addon-sdk/copy_source.py
+++ b/addon-sdk/copy_source.py
@@ -1,46 +1,46 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import os
-import sys
-
-if len(sys.argv) != 4:
-    print >> sys.stderr, "Usage: copy_source.py " \
-                         "<topsrcdir> <source directory> <target directory>"
-    sys.exit(1)
-
-topsrcdir = sys.argv[1]
-source_dir = sys.argv[2]
-target_dir = sys.argv[3]
-
-print """
-DEPTH     = ..
-topsrcdir = %(topsrcdir)s
-srcdir    = %(topsrcdir)s/addon-sdk
-VPATH     = %(topsrcdir)s/addon-sdk
-
-include $(topsrcdir)/config/config.mk
-""" % {'topsrcdir': topsrcdir}
-
-real_source = source_dir.replace('/', os.sep)
-if not os.path.exists(real_source):
-    print >> sys.stderr, "Error: Missing source file %s" % real_source
-    sys.exit(1)
-elif not os.path.isdir(real_source):
-    print >> sys.stderr, "Error: Source %s is not a directory" % real_source
-    sys.exit(1)
-for dirpath, dirnames, filenames in os.walk(real_source):
-    if not filenames:
-        continue
-    dirpath = dirpath.replace(os.sep, '/')
-    relative = dirpath[len(source_dir):]
-    varname = "COMMONJS%s" % relative.replace('/', '_')
-    print "%s_FILES = \\" % varname
-    for name in filenames:
-        print "  %s/%s \\" % (dirpath, name)
-    print "  $(NULL)"
-    print "%s_DEST = %s%s" % (varname, target_dir, relative)
-    print "INSTALL_TARGETS += %s\n" % varname
-
-print "include $(topsrcdir)/config/rules.mk"
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+import sys
+
+if len(sys.argv) != 4:
+    print >> sys.stderr, "Usage: copy_source.py " \
+                         "<topsrcdir> <source directory> <target directory>"
+    sys.exit(1)
+
+topsrcdir = sys.argv[1]
+source_dir = sys.argv[2]
+target_dir = sys.argv[3]
+
+print """
+DEPTH     = ..
+topsrcdir = %(topsrcdir)s
+srcdir    = %(topsrcdir)s/addon-sdk
+VPATH     = %(topsrcdir)s/addon-sdk
+
+include $(topsrcdir)/config/config.mk
+""" % {'topsrcdir': topsrcdir}
+
+real_source = source_dir.replace('/', os.sep)
+if not os.path.exists(real_source):
+    print >> sys.stderr, "Error: Missing source file %s" % real_source
+    sys.exit(1)
+elif not os.path.isdir(real_source):
+    print >> sys.stderr, "Error: Source %s is not a directory" % real_source
+    sys.exit(1)
+for dirpath, dirnames, filenames in os.walk(real_source):
+    if not filenames:
+        continue
+    dirpath = dirpath.replace(os.sep, '/')
+    relative = dirpath[len(source_dir):]
+    varname = "COMMONJS%s" % relative.replace('/', '_')
+    print "%s_FILES = \\" % varname
+    for name in filenames:
+        print "  %s/%s \\" % (dirpath, name)
+    print "  $(NULL)"
+    print "%s_DEST = %s%s" % (varname, target_dir, relative)
+    print "INSTALL_TARGETS += %s\n" % varname
+
+print "include $(topsrcdir)/config/rules.mk"
--- a/addon-sdk/mach_commands.py
+++ b/addon-sdk/mach_commands.py
@@ -1,37 +1,37 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# Integrates the xpcshell test runner with mach.
-
-import os
-import sys
-
-from mozbuild.base import (
-    MachCommandBase,
-    MozbuildObject,
-)
-
-from mach.decorators import (
-    CommandArgument,
-    CommandProvider,
-    Command,
-)
-
-class JetpackRunner(MozbuildObject):
-    """Run jetpack tests."""
-    def run_tests(self, **kwargs):
-        self._run_make(target='jetpack-tests')
-
-@CommandProvider
-class MachCommands(MachCommandBase):
-    @Command('jetpack-test', help='Runs the jetpack test suite.')
-    def run_jetpack_test(self, **params):
-        # We should probably have a utility function to ensure the tree is
-        # ready to run tests. Until then, we just create the state dir (in
-        # case the tree wasn't built with mach).
-        self._ensure_state_subdir_exists('.')
-
-        jetpack = self._spawn(JetpackRunner)
-
-        jetpack.run_tests(**params)
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Integrates the xpcshell test runner with mach.
+
+import os
+import sys
+
+from mozbuild.base import (
+    MachCommandBase,
+    MozbuildObject,
+)
+
+from mach.decorators import (
+    CommandArgument,
+    CommandProvider,
+    Command,
+)
+
+class JetpackRunner(MozbuildObject):
+    """Run jetpack tests."""
+    def run_tests(self, **kwargs):
+        self._run_make(target='jetpack-tests')
+
+@CommandProvider
+class MachCommands(MachCommandBase):
+    @Command('jetpack-test', help='Runs the jetpack test suite.')
+    def run_jetpack_test(self, **params):
+        # We should probably have a utility function to ensure the tree is
+        # ready to run tests. Until then, we just create the state dir (in
+        # case the tree wasn't built with mach).
+        self._ensure_state_subdir_exists('.')
+
+        jetpack = self._spawn(JetpackRunner)
+
+        jetpack.run_tests(**params)