nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gn...@apache.org
Subject [incubator-nuttx] 01/02: tools/mkdeps: Always look in the current directory
Date Sat, 23 May 2020 15:27:46 GMT
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d2bb9bf2b4dbc9bf937e3ca38092b326eddb3349
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
AuthorDate: Thu May 21 18:46:14 2020 +0800

    tools/mkdeps: Always look in the current directory
    
    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
---
 tools/mkdeps.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tools/mkdeps.c b/tools/mkdeps.c
index 4e0e932..7208459 100644
--- a/tools/mkdeps.c
+++ b/tools/mkdeps.c
@@ -287,6 +287,10 @@ static void parse_args(int argc, char **argv)
   char *args = NULL;
   int argidx;
 
+  /* Always look in the current directory */
+
+  g_altpath = strdup(".");
+
   /* Accumulate CFLAGS up to "--" */
 
   for (argidx = 1; argidx < argc; argidx++)
@@ -362,13 +366,6 @@ static void parse_args(int argc, char **argv)
 
   g_files = args;
 
-  /* If no paths were specified, then look in the current directory only */
-
-  if (!g_altpath)
-    {
-      g_altpath = strdup(".");
-    }
-
   if (g_debug)
     {
       fprintf(stderr, "SELECTIONS\n");


Mime
View raw message