Commit 9d7d1d7
Do not limit includes to the
Commit 405a24a (Limit recursive sketch compilation to the `src`
directory) modified the sketch loading to only recursively load files
from the `src` subdirectory of a sketch, in order to only compile source
files in that subdirectory. As a side effect, this also prevents source
and header files in other subdirectories from being copied into the
build directory, and hence from being included. This side effect was not
entirely unanticipated, but its implications were underestimated.
This commit undoes these side effects: source and header files are again
loaded (and thus copied) recursively in all subdirectories of a sketch.
Compilation is still limited to the src subdirectory (there already was
code to achieve this). This commit also modifies include detection to be
limited to the src subdirectory (which was previously implicit, since it
can only look at files that were copied into the build directory).
With this commit, the the meaning of "loading" a file becomes a bit
fuzzy in the code, but this is intended to be fixed in a future
refactor.
A test will be added in the next commit.
This fixes arduino/Arduino#5186.
Signed-off-by: Cristian Maglie <c.maglie@arduino.cc>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>src sketch subdirectory1 parent 26eadb9 commit 9d7d1d7
File tree
4 files changed
+17
-15
lines changed- src/arduino.cc/builder
- test
- sketch_with_subfolders/subfolder
4 files changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
Whitespace-only changes.
0 commit comments