3 # Awk script to generate include/generated/machtypes.h
4 # Heavily based on arch/arm/tools/gen-mach-types
12 config
[nr] =
"CONFIG_"$
2;
18 printf(" * Automagically generated, don't touch.\n");
20 printf("#ifndef __ASM_SH_MACHTYPES_H\n");
21 printf("#define __ASM_SH_MACHTYPES_H\n");
24 printf(" * We'll use the following MACH_xxx defs for placeholders for the time\n");
25 printf(" * being .. these will all go away once sh_machtype is assigned per-board.\n");
27 printf(" * For now we leave things the way they are for backwards compatibility.\n");
30 printf("/* Mach types */\n");
32 for (i =
0; i
< nr; i
++) {
33 printf("#ifdef %s\n", config
[i
]);
34 printf(" #define MACH_%s\t\t1\n", mach
[i
]);
36 printf(" #define MACH_%s\t\t0\n", mach
[i
]);
41 printf("/* Machtype checks */\n");
42 for (i =
0; i
< nr; i
++)
43 printf("#define mach_is_%s()\t\t\t(MACH_%s)\n",
44 tolower(mach
[i
]), mach
[i
]);
46 printf("#endif /* __ASM_SH_MACHTYPES_H */\n");