mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
tools/sethost.sh & tools/configure.c: When no make argument is passed, silence the make output.
This commit is contained in:
+16
-3
@@ -380,12 +380,25 @@ static void parse_args(int argc, char **argv)
|
|||||||
static int run_make(const char *arg)
|
static int run_make(const char *arg)
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
|
bool v1 = false;
|
||||||
|
|
||||||
snprintf(g_buffer, BUFFER_SIZE, "make %s", arg);
|
snprintf(g_buffer, BUFFER_SIZE, "make %s", arg);
|
||||||
|
|
||||||
for (argv = g_makeargv; *argv; argv++)
|
for (argv = g_makeargv; *argv; argv++)
|
||||||
{
|
{
|
||||||
strncat(g_buffer, " ", BUFFER_SIZE);
|
strncat(g_buffer, " ", BUFFER_SIZE - 1);
|
||||||
strncat(g_buffer, *argv, BUFFER_SIZE);
|
strncat(g_buffer, *argv, BUFFER_SIZE - 1);
|
||||||
|
if (strcmp(*argv, "V=1") == 0)
|
||||||
|
{
|
||||||
|
v1 = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!v1)
|
||||||
|
{
|
||||||
|
#ifndef WIN32
|
||||||
|
strncat(g_buffer, " 1>/dev/null", BUFFER_SIZE - 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return system(g_buffer);
|
return system(g_buffer);
|
||||||
@@ -644,7 +657,7 @@ static void config_search(const char *boarddir,
|
|||||||
|
|
||||||
/* Make a modifiable copy */
|
/* Make a modifiable copy */
|
||||||
|
|
||||||
strncpy(g_buffer, boarddir, BUFFER_SIZE);
|
strncpy(g_buffer, boarddir, BUFFER_SIZE - 1);
|
||||||
|
|
||||||
/* Save the <archdir> */
|
/* Save the <archdir> */
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -122,7 +122,7 @@ fi
|
|||||||
if [ -x tools/sethost.sh ]; then
|
if [ -x tools/sethost.sh ]; then
|
||||||
nuttx=$PWD
|
nuttx=$PWD
|
||||||
else
|
else
|
||||||
echo "This script must be execute in nuttx/ or nutts/tools directories"
|
echo "This script must be execute in nuttx/ or nuttx/tools directories"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -211,4 +211,9 @@ fi
|
|||||||
sed -i -e "/CONFIG_HOST_OTHER/d" $nuttx/.config
|
sed -i -e "/CONFIG_HOST_OTHER/d" $nuttx/.config
|
||||||
|
|
||||||
echo " Refreshing..."
|
echo " Refreshing..."
|
||||||
make olddefconfig $* || { echo "ERROR: failed to refresh"; exit 1; }
|
|
||||||
|
if grep -q "V=1" <<< "$*" ; then
|
||||||
|
make olddefconfig $* || { echo "ERROR: failed to refresh"; exit 1; }
|
||||||
|
else
|
||||||
|
make olddefconfig $* 1>/dev/null || { echo "ERROR: failed to refresh"; exit 1; }
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user