aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-08-23 20:21:36 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-08-23 20:21:36 +0200
commit0dddbc1a59795a77679d8c5ef48a2795cb470563 (patch)
treec0b9b3895f4cb4710d26111237f782d34459c10b /applets
parent29483ffb075f1a64d2183ebe188b83f5704ba637 (diff)
downloadbusybox-0dddbc1a59795a77679d8c5ef48a2795cb470563.tar.gz
build system: always rewrite NUM_APPLETS.h
Conditional rewrite can keep NUM_APPLETS.h mtime old, this causes make to try to regenerate it at every invocation. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'applets')
-rw-r--r--applets/applet_tables.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c
index 8401a1549..ef911a43b 100644
--- a/applets/applet_tables.c
+++ b/applets/applet_tables.c
@@ -192,27 +192,28 @@ int main(int argc, char **argv)
printf("};\n");
#endif
//printf("#endif /* SKIP_definitions */\n");
+
// printf("\n");
// printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
if (argv[2]) {
- char line_old[80];
- char line_new[80];
FILE *fp;
+ char line_new[80];
+// char line_old[80];
- line_old[0] = 0;
- fp = fopen(argv[2], "r");
- if (fp) {
- fgets(line_old, sizeof(line_old), fp);
- fclose(fp);
- }
sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
- if (strcmp(line_old, line_new) != 0) {
+// line_old[0] = 0;
+// fp = fopen(argv[2], "r");
+// if (fp) {
+// fgets(line_old, sizeof(line_old), fp);
+// fclose(fp);
+// }
+// if (strcmp(line_old, line_new) != 0) {
fp = fopen(argv[2], "w");
if (!fp)
return 1;
fputs(line_new, fp);
- }
+// }
}
return 0;