Commit graph

264 commits

Author SHA1 Message Date
Sam Bobroff 224fa9455c merge_config.sh: exit on missing input files
Add a check for the existence of input files and exit (with failure)
if they are missing.

Without this additional check, missing files produce error messages
but still result in an output file being generated and a successful
exit code.

Change-Id: I8609e00ce99b491dcb1d41e64106a6829dc1fb41
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 15e1669e48 kbuild: mergeconfig: move an error check to merge_config.sh
Currently, "make tinyconfig" does not work with "-j" option.

  $ make mrproper
  $ make -j8 tinyconfig
    HOSTCC  scripts/basic/fixdep
    HOSTCC  scripts/kconfig/conf.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/zconf.lex.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC  scripts/kconfig/zconf.tab.o
    HOSTLD  scripts/kconfig/conf
  scripts/kconfig/conf --allnoconfig Kconfig
  #
  # configuration written to .config
  #
  scripts/kconfig/Makefile:122: *** You need an existing .config
  for this target.  Stop.
  make: *** [tinyconfig] Error 2

As shown above, "allnoconfig" has created the .config file before
mergeconfig is called, but Make still raises a false alarm because
of some sort of race condition.

We can fix this issue by moving the error check to the shell script.

Anyway, scripts/kconfig/merge_config.sh always requires an existing
.config as a base file.  It is reasonable to check its existence in
the shell script.

Change-Id: I4c6b26bf3b19c5d5b19ed43ee6b553f7a5944c21
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Masahiro Yamada 1540777fe4 kconfig: fix a misspelling in scripts/kconfig/merge_config.sh
Change-Id: I5fdbe712db8e15031c8c214c0d4378f8508d03da
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Olof Johansson 40cd34e5de merge_config.sh: Display usage if given too few arguments
Two or more arguments are always expected. Show usage and exit if
given less.

Change-Id: I1e503495f34eab3f181238a1aa877a4aee3b7e5e
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:59 -05:00
Anas Nashif 9b9ab3767a make sed happy on OSX when invoked with -i
Change-Id: I6180aedf11ec68e9698e48c612d202e39eaa3adf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:31 -05:00
Anas Nashif f367f071b6 doxygen: add @brief and capitalize
Remove function name from comment and add @brief instead.
Also capitilize first letter.

Change-Id: Ib708b49bf02e5bc89b0066637a55874e659637e0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:33 -05:00
Anas Nashif 27603f4801 Revert "Kbuild: Tools build at TIMO_BASE directory."
This reverts commit 23da104f0dc8c6c4a768a727b564272c084aa79b.

Conflicts:
	Makefile
	Makefile.inc

Change-Id: Ia8f2efe3cd37e82c04c304f04c46d787d2265dde

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif 0180a63d62 Revert "Kconfig stop creating empty header files."
This reverts commit 5e56c21dfae2e08253820f7fcad1e96be009ca89.

Change-Id: Ie4e0c2afe27937206230e5574c41e5a4a4c3d616
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Anas Nashif fda70d2130 Revert "Kconfig: Create dependency header files in outpur directory."
This reverts commit ecf5bd8048b683f119e867e85c1693955694b33d.

Change-Id: I51717ad96f312be1f116534f6b79d599bf0e5b4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:24 -05:00
Juan Manuel Cruz 1eb89a9b3a Kconfig: Create dependency header files in outpur directory.
Kconfig creates a header file per each Kconfig symbol that changes
in between configuration changes and rebuilds.

This commit creates the files in the output directory specified by the
O environment variable.

Change-Id: I01b3482e9497f70961268505865788385b41ca8f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:22 -05:00
Juan Manuel Cruz 80ce28aebe Kconfig stop creating empty header files.
This commit fixes the issue of kbuild creating empty header files
at the include/config directory.

Linux Kconfig creates a header file for each Kconfig symbol that
changed in between build runs and re-configurations. This feature
is not needed in Zephyr.

Change-Id: I366183cef398b3ab7488456ddbed07f292c5a9bc
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:14 -05:00
Juan Manuel Cruz 4d7f954896 Kbuild: Tools build at TIMO_BASE directory.
This commit allows the tools build to be executed at TIMO_BASE
directory insted of being executed at the PROJECT_BASE.
This allows the sanity checks to run faster because there is no
need to recompile the tools with every test.

Change-Id: I9e9ac78695db884b44e2693029e9ea6ed96b21c8
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Anas Nashif 02085a3fda Kbuild: make merge_config less verbose
Change-Id: I1102f383db23fad18364f09eff6128391980637a

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:10 -05:00
Inaky Perez-Gonzalez 8ddf82cf70 First commit
Signed-off-by:  <inaky.perez-gonzalez@intel.com>
2015-04-10 16:44:37 -07:00