error: no macro name given in #ifndef directiveってなんだという

make allしたら盛大にエラーが出てきた。

$ make all
Compiling Source/ColorDetector.c to ColorDetector.o
In file included from Header/ColorDetector.h:5,
                      from Source/ColorDetector.c:1:
Header/LightSensor.h:3:8: error: no macro name given in #ifndef directive

Header/ColorDetector.h:15: error: syntax error before 'detect-mode'
....
....
....
以下数十行

ここのエラー文の中で

Header/LightSensor.h:3:8: error: no macro name given in #ifndef directive

というエラーが出てきた。なんのことかわからずなぜか別の...の部分のエラーを最初に解決しようとしてて見落としてた。エラー文を検索しても出ないからどうしようかと思ったけど、よくよくHeader/LightSensor.hを見てみると、#ifndef の MACRONAME 部分を書き忘れてた。

#ifndef 
#define __LIGHT_SENSOR__

...

#endif

これの #ifndef に __LIGHT_SENSOR__ を付け加えればエラーは消えた。

#ifndef __LIGHT_SENSOR__

ちゃんと休憩して、冷静な目でみたらすぐエラーは解決したので休憩大事だなと思う。