|
35 | 35 |
|
36 | 36 | # this is our top-level makefile
|
37 | 37 | .if make(pkg-*)
|
38 |
| -DIRDEPS_FILTER = Mpkgs/* |
| 38 | +DIRDEPS_FILTER = Mtargets/* |
39 | 39 | .endif
|
40 | 40 |
|
41 | 41 | # in theory, this is what we want
|
42 |
| -target_dirs = pkgs pkgs/pseudo |
| 42 | +target_dirs = targets targets/pseudo |
43 | 43 | # these tweak how we do it
|
44 | 44 | target_prefix = pkg- build-
|
45 | 45 | DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@}
|
46 | 46 |
|
47 |
| -.if ${DIRDEPS:Mpkgs/pseudo/*} != "" |
| 47 | +.if ${DIRDEPS:Mtargets/pseudo/*} != "" |
48 | 48 | # all bets are off
|
49 | 49 | PKG_MACHINE_LIST = ${ALL_MACHINE_LIST}
|
50 | 50 | .endif
|
51 | 51 |
|
52 | 52 | .if make(check-commit)
|
53 | 53 | # a special case
|
54 |
| -DIRDEPS = pkgs/pseudo/check-commit |
| 54 | +DIRDEPS = targets/pseudo/check-commit |
55 | 55 | .if defined(ALL_MACHINES)
|
56 | 56 | CHECK_MACHINE_LIST = all
|
57 | 57 | .undef ALL_MACHINES
|
@@ -127,16 +127,15 @@ start_utc := ${now_utc}
|
127 | 127 |
|
128 | 128 | _begin = count-makefiles
|
129 | 129 |
|
130 |
| -# by default, we clean pkgs/ which can otherwise accumulate a lot of cruft |
131 |
| -.if ${NEED_CLEAN_PKGS:Uyes:tl} != "no" |
132 |
| -_begin += clean-pkgs |
133 |
| -.endif |
134 |
| -.if defined(SHIPDIR) && ${NEED_CLEAN_SHIPDIR:Uno:tl} != "no" && exists(${SHIPDIR}) |
135 |
| -_begin += clean-shipdir |
136 |
| -.endif |
137 |
| -.if ${NEED_CLEAN_ERROR_LOGS:Uyes:tl} == "yes" |
| 130 | +__DEFAULT_YES_OPTIONS+= \ |
| 131 | + CLEAN_ERROR_LOGS |
| 132 | + |
| 133 | +.include <bsd.mkopt.mk> |
| 134 | + |
| 135 | +.if ${MK_CLEAN_ERROR_LOGS} == "yes" |
138 | 136 | _begin += clean-error-logs
|
139 | 137 | .endif
|
| 138 | + |
140 | 139 | .if !empty(_begin) && !make(clean*)
|
141 | 140 | dirdeps: ${_begin} .WAIT
|
142 | 141 | .endif
|
@@ -167,12 +166,6 @@ _build_failed: .NOMETA
|
167 | 166 | clean-error-logs: .NOMETA
|
168 | 167 | @test ! -d ${meta_error_log:H} || rm -f ${meta_error_log:H}/*log
|
169 | 168 |
|
170 |
| -clean-pkgs: .NOMETA |
171 |
| - @rm -rf ${ALL_MACHINE_LIST:N${MACHINE}:@m@${OBJROOT}$m/pkgs@} ${OBJROOT}${MACHINE}/pkgs/* |
172 |
| - |
173 |
| -clean-shipdir: .NOMETA |
174 |
| - ${"${SHIPDIR:tl:Nno:N*\:*}":?rm -f ${SHIPDIR}/*:} |
175 |
| - |
176 | 169 | .if !target(_DIRDEP_USE)
|
177 | 170 | # we did not read dirdeps.mk above, the target may be here
|
178 | 171 | .include "Makefile.xtras"
|
|
0 commit comments