Commit 1c49668
committed
libast build: fix circular dependency (re: 54a3e1c)
The generated depenency rules file for libast, arch/*/lib/mam/ast,
currently shows a circular dependency: ast_std.h → regex.h →
ast_wchar.h → stdio.h → ast_stdio.h → ast_std.h. As a result,
ast_stdio.h is not correctly depending on ast_std.h. The mkdeps
script indicates this with a comment under ast_stdio.h:
note * FIXME: circular dependency: ast_std.h
We have to break this depenency loop somewhere. The best place to
break it is in ast_wchar.h, which is generated from features/wchar.
It has a '#include <stdio.h>', loading Sfio's stdio compatibility
interface as a hack to avoid the system's native wchar.h (on Linux
in particular) from pulling in native system stdio.h stuff. We
don't really need the dependency resolution for that #include.
src/cmd/INIT/mkdeps.sh:
- Add a feature to exclude individual #include directives from
dependency resolution: when grepping for #include directives in
the preinstalled AST headers, skip any line containing NODEP.
src/lib/libast/features/wchar:
- Add /* NODEP */ to the offending '#include <stdio.h>'.1 parent 103f72e commit 1c49668
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments