1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/fixdep/fixdep_riot.patch
2020-08-10 12:17:59 +02:00

64 lines
1.6 KiB
Diff

104c104
< fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
---
> fprintf(stderr, "Usage: fixdep <depfile> <target> <depsdir>\n");
215c215
< static void use_config(const char *m, int slen)
---
> static void use_config(const char *m, int slen, const char *depsdir)
223c223
< print_dep(m, slen, "include/config");
---
> print_dep(m, slen, depsdir);
237c237
< static void parse_config_file(const char *p)
---
> static void parse_config_file(const char *p, const char *depsdir)
239c239
< const char *q, *r;
---
> const char *q;
251,256c251,252
< if (str_ends_with(p, q - p, "_MODULE"))
< r = q - 7;
< else
< r = q;
< if (r > p)
< use_config(p, r - p);
---
> if (q > p)
> use_config(p, q - p, depsdir);
296,297c292
< return str_ends_with(s, len, "include/generated/autoconf.h") ||
< str_ends_with(s, len, "include/generated/autoksyms.h");
---
> return str_ends_with(s, len, "generated/autoconf.h");
305c300
< static void parse_dep_file(char *m, const char *target)
---
> static void parse_dep_file(char *m, const char *target, const char *depsdir)
352c347
< xprintf("source_%s := %s\n\n",
---
> xprintf("deps_%s :=\\\n %s \\\n",
354d348
< xprintf("deps_%s := \\\n", target);
362c356
< parse_config_file(buf);
---
> parse_config_file(buf, depsdir);
387c381
< const char *depfile, *target, *cmdline;
---
> const char *depfile, *target, *depsdir;
395,397c389
< cmdline = argv[3];
<
< xprintf("cmd_%s := %s\n\n", target, cmdline);
---
> depsdir = argv[3];
400c392
< parse_dep_file(buf, target);
---
> parse_dep_file(buf, target, depsdir);