Update tools/mkkconfig.bat; silence some Makefile output

This commit is contained in:
Gregory Nutt 2016-06-06 12:30:01 -06:00
parent e725f5e9e1
commit 807e51ad05
3 changed files with 24 additions and 40 deletions

View File

@ -60,7 +60,7 @@ nothing:
install:
preconfig: $(foreach SDIR, $(SUBDIRS), $(SDIR)_preconfig)
$(MKKCONFIG) -m "$(shell cat Kmenu)"
$(Q) $(MKKCONFIG) -m "$(shell cat Kmenu)"
context: $(foreach SDIR, $(SUBDIRS), $(SDIR)_context)

View File

@ -114,8 +114,7 @@ context_serialize:
context: context_serialize
preconfig:$(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig)
echo subdirs done
$(MKKCONFIG)
$(Q) $(MKKCONFIG)
.depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend)

View File

@ -2,7 +2,7 @@
REM apps/tools/mkkconfig.bat
REM
REM Copyright (C) 2015 Gregory Nutt. All rights reserved.
REM Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
REM Author: Gregory Nutt <gnutt@nuttx.org>
REM
REM Redistribution and use in source and binary forms, with or without
@ -35,12 +35,12 @@ REM
REM Parse command line arguments
SET topdir=
SET menu=
SET kconfig=Kconfig
:ArgLoop
IF "%1"=="" GOTO :EndOfLoop
IF "%1"=="-t" GOTO :SetTopDir
IF "%1"=="-m" GOTO :SetMenu
IF "%1"=="-o" GOTO :SetKconfig
IF "%1"=="-h" GOTO :ShowUsage
@ -51,9 +51,9 @@ GOTO :ShowUsage
SET debug=-d
GOTO :NextArg
:SetTopDir
:SetMenu
SHIFT
SET topdir=%1
SET menu=%1
GOTO :NextArg
:SetKconfig
@ -67,34 +67,6 @@ GOTO :ArgLoop
REM Check input Parameters
:EndOfLoop
IF "%topdir%"=="" (
IF EXIST tools\mkkconfig.bat (
SET topdir=%cd%
) ELSE (
cd ..
IF %ERRORLEVEL% GTR 0 (
Echo ERROR: failed cd ..
GOTO :End
)
IF EXIST tools\mkkconfig.bat (
SET topdir=%cd%
) ELSE (
Echo ERROR: Cannot find top directory
GOTO :End
)
)
) ELSE (
IF NOT EXIST "%topdir%" (
Echo ERROR: %topdir% does not EXIST
GOTO :End
)
Cd %topdir%
IF %ERRORLEVEL% GTR 0 (
Echo ERROR: failed cd %topdir%
GOTO :End
)
)
IF EXIST %kconfig% (
Del /f /q %kconfig%
REM IF %ERRORLEVEL% GTR 0 (
@ -107,27 +79,40 @@ Echo # > %kconfig%
Echo # For a description of the syntax of this configuration file, >> %kconfig%
Echo # see the file kconfig-language.txt in the NuttX tools repository. >> %kconfig%
Echo # >> %kconfig%
Echo # This file is autogenerated, do not edit. >> %kconfig%
Echo # >> %kconfig%
Echo >> %kconfig%
IF %menu% NEQ "" (
Echo menu "%menu%" >> %kconfig%
)
DIR /B /A:D >_tmp_.dat
Echo source "$APPSDIR/builtin/Kconfig" >> %kconfig%
FOR /F "tokens=*" %%s IN (_tmp_.dat) do (
if "%%s" NEQ "builtin" Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig%
IF EXIST %%s\Kconfig (
Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig%
)
)
DEL _tmp_.dat
IF %menu% NEQ "" (
Echo endmenu # %menu% >> %kconfig%
)
GOTO :End
REM Exit showing usage
:ShowUsage
Echo USAGE: %0 [-d] [-t ^<topdir^>] [-o ^<kconfig-file^>]
Echo USAGE: %0 [-d] [-m ^<menu^>] [-o ^<kconfig-file^>]
Echo %0 [-h]
Echo Where:
Echo ^<-d^>:
Echo Enables debug output
Echo -t ^<topdir^>:
Echo Identifies the top applicatino directory
Echo -m ^<menu^>:
Echo Menu description
Echo -o ^<kconfig-file^>:
Echo Identifies the specific configuratin for the selected ^<board-name^>.
Echo This must correspond to a sub-directory under the board directory at