diff mbox

[U-Boot,v2,4/6] moveconfig: Add a constant for auto.conf

Message ID 20170602013903.28731-5-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass June 2, 2017, 1:39 a.m. UTC
This filename is used a few times. Move it to a constant before adding
further uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 tools/moveconfig.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Simon Glass June 15, 2017, 7:21 p.m. UTC | #1
This filename is used a few times. Move it to a constant before adding
further uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 tools/moveconfig.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 96463fe2e3..afab2644e7 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -263,6 +263,9 @@  COLOR_LIGHT_PURPLE = '1;35'
 COLOR_LIGHT_CYAN   = '1;36'
 COLOR_WHITE        = '1;37'
 
+AUTO_CONF_PATH = 'include/config/auto.conf'
+
+
 ### helper functions ###
 def get_devnull():
     """Get the file object of '/dev/null' device."""
@@ -753,8 +756,7 @@  class KconfigParser:
         self.autoconf = os.path.join(build_dir, 'include', 'autoconf.mk')
         self.spl_autoconf = os.path.join(build_dir, 'spl', 'include',
                                          'autoconf.mk')
-        self.config_autoconf = os.path.join(build_dir, 'include', 'config',
-                                            'auto.conf')
+        self.config_autoconf = os.path.join(build_dir, AUTO_CONF_PATH)
         self.defconfig = os.path.join(build_dir, 'defconfig')
 
     def get_cross_compile(self):
@@ -1072,7 +1074,7 @@  class Slot:
         self.state = STATE_DEFCONFIG
 
     def do_autoconf(self):
-        """Run 'make include/config/auto.conf'."""
+        """Run 'make AUTO_CONF_PATH'."""
 
         self.cross_compile = self.parser.get_cross_compile()
         if self.cross_compile is None:
@@ -1085,7 +1087,7 @@  class Slot:
         if self.cross_compile:
             cmd.append('CROSS_COMPILE=%s' % self.cross_compile)
         cmd.append('KCONFIG_IGNORE_DUPLICATES=1')
-        cmd.append('include/config/auto.conf')
+        cmd.append(AUTO_CONF_PATH)
         self.ps = subprocess.Popen(cmd, stdout=self.devnull,
                                    stderr=subprocess.PIPE,
                                    cwd=self.current_src_dir)