zdev: generate usage text headers instead of C files

Generating and then including C source files from another C file can
lead to unexpected compilation errors in certain environments.

Switch the usage text generation from %_usage.c to %_usage.h. The
generated header provides the usage_text definition directly, and
chzdev.c and lszdev.c include the corresponding *_usage.h instead.

Update depfile prerequisites and the clean target to match the new
generated artifacts.

Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Polensky
2026-04-14 12:51:01 +02:00
committed by Jan Höppner
parent d8cea21e1e
commit 43cf7873be
3 changed files with 11 additions and 13 deletions

View File

@@ -111,10 +111,8 @@ struct options {
unsigned int no_module_load:1;
};
/* Makefile converts chzdev_usage.txt into C file which we include here. */
static const char *usage_text =
#include "chzdev_usage.c"
;
/* Makefile converts chzdev_usage.txt into header file which we include here. */
#include "chzdev_usage.h"
#define OPT_ANONYMOUS_BASE 0x80
enum {