Files
OpenCellular/board/keyborg/debug.c
Vic Yang 2478058b7a Emit error when board.h or config_chip.h is included before config.h
If board.h or config_chip.h is included before config.h, CONFIG_* flags
may be incorrect. For example, if config.h says:

    ...
  #define CONFIG_DEFINED_FLAG
    ...
  #include "board.h"
    ...

And board.h says:

  #ifndef __BOARD_H
  #define __BOARD_H
    ...
  #undef CONFIG_DEFINED_FLAG
    ...
  #endif

Then this code:

  #include "board.h"
  #include "config.h"

would results in CONFIG_DEFINED_FLAG being defined, instead of undefined
as stated in board.h.

Avoid this by emitting error when board.h or config_chip.h is included
before config.h.

BUG=None
TEST=make buildall
BRANCH=None

Change-Id: Ic4a8b68e8ab1ef2a4cf9e926ab9008d2b106b943
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203265
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2014-06-11 03:34:17 +00:00

921 B