kconfig: warn no new line at end of file
[carl9170fw.git] / config / zconf.l
index 5b0188a7e9a6f57272d5914e750c112335dfccca..a6caf06a6506d21648384e872c7adcd99af28b0c 100644 (file)
@@ -261,6 +261,10 @@ n  [A-Za-z0-9_-]
 <<EOF>>        {
        BEGIN(INITIAL);
 
+       if (prev_token != T_EOL && prev_token != T_HELPTEXT)
+               fprintf(stderr, "%s:%d:warning: no new line at end of file\n",
+                       current_file->name, yylineno);
+
        if (current_file) {
                zconf_endfile();
                return T_EOL;