Deleted Added
full compact
Makefile (275282) Makefile (275339)
1# $FreeBSD: projects/bmake/targets/Makefile 266264 2014-05-16 17:50:23Z sjg $
1# $FreeBSD: projects/bmake/targets/Makefile 275339 2014-11-30 18:45:46Z sjg $
2
3# This is the top-level makefile - derrived from the Junos version
4#
5# If a subdir that matches the requested target exists, we assume
6# a build target and initialize DIRDEPS, dirdeps.mk does the rest.
7#
8# Otherwise we include Makefile.xtras and hope it knows what to do.
9#

--- 20 unchanged lines hidden (view full) ---

30# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34.if ${.MAKE.LEVEL} == 0
35
36# this is our top-level makefile
37.if make(pkg-*)
2
3# This is the top-level makefile - derrived from the Junos version
4#
5# If a subdir that matches the requested target exists, we assume
6# a build target and initialize DIRDEPS, dirdeps.mk does the rest.
7#
8# Otherwise we include Makefile.xtras and hope it knows what to do.
9#

--- 20 unchanged lines hidden (view full) ---

30# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34.if ${.MAKE.LEVEL} == 0
35
36# this is our top-level makefile
37.if make(pkg-*)
38DIRDEPS_FILTER = Mpkgs/*
38DIRDEPS_FILTER = Mtargets/*
39.endif
40
41# in theory, this is what we want
39.endif
40
41# in theory, this is what we want
42target_dirs = pkgs pkgs/pseudo
42target_dirs = targets targets/pseudo
43# these tweak how we do it
44target_prefix = pkg- build-
45DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@}
46
43# these tweak how we do it
44target_prefix = pkg- build-
45DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@}
46
47.if ${DIRDEPS:Mpkgs/pseudo/*} != ""
47.if ${DIRDEPS:Mtargets/pseudo/*} != ""
48# all bets are off
49PKG_MACHINE_LIST = ${ALL_MACHINE_LIST}
50.endif
51
52.if make(check-commit)
53# a special case
48# all bets are off
49PKG_MACHINE_LIST = ${ALL_MACHINE_LIST}
50.endif
51
52.if make(check-commit)
53# a special case
54DIRDEPS = pkgs/pseudo/check-commit
54DIRDEPS = targets/pseudo/check-commit
55.if defined(ALL_MACHINES)
56CHECK_MACHINE_LIST = all
57.undef ALL_MACHINES
58.endif
59SHIPDIR = no
60
61.else
62

--- 59 unchanged lines hidden (view full) ---

122.if ${.MAKEFLAGS:M-V} == ""
123.info ${.newline}${TIME_STAMP} Start ${.TARGETS}
124now_utc = ${%s:L:gmtime}
125start_utc := ${now_utc}
126.endif
127
128_begin = count-makefiles
129
55.if defined(ALL_MACHINES)
56CHECK_MACHINE_LIST = all
57.undef ALL_MACHINES
58.endif
59SHIPDIR = no
60
61.else
62

--- 59 unchanged lines hidden (view full) ---

122.if ${.MAKEFLAGS:M-V} == ""
123.info ${.newline}${TIME_STAMP} Start ${.TARGETS}
124now_utc = ${%s:L:gmtime}
125start_utc := ${now_utc}
126.endif
127
128_begin = count-makefiles
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_begin += clean-error-logs
139.endif
136_begin += clean-error-logs
137.endif
138
140.if !empty(_begin) && !make(clean*)
141dirdeps: ${_begin} .WAIT
142.endif
143
144.include "Makefile.inc"
145
146.include <dirdeps.mk>
147

--- 14 unchanged lines hidden (view full) ---

162_build_failed: .NOMETA
163 @echo "${TIME_STAMP} Failed ${.TARGETS} ${elapsed_time}"
164
165.endif # !empty(DIRDEPS)
166
167clean-error-logs: .NOMETA
168 @test ! -d ${meta_error_log:H} || rm -f ${meta_error_log:H}/*log
169
139.if !empty(_begin) && !make(clean*)
140dirdeps: ${_begin} .WAIT
141.endif
142
143.include "Makefile.inc"
144
145.include <dirdeps.mk>
146

--- 14 unchanged lines hidden (view full) ---

161_build_failed: .NOMETA
162 @echo "${TIME_STAMP} Failed ${.TARGETS} ${elapsed_time}"
163
164.endif # !empty(DIRDEPS)
165
166clean-error-logs: .NOMETA
167 @test ! -d ${meta_error_log:H} || rm -f ${meta_error_log:H}/*log
168
170clean-pkgs: .NOMETA
171 @rm -rf ${ALL_MACHINE_LIST:N${MACHINE}:@m@${OBJROOT}$m/pkgs@} ${OBJROOT}${MACHINE}/pkgs/*
172
173clean-shipdir: .NOMETA
174 ${"${SHIPDIR:tl:Nno:N*\:*}":?rm -f ${SHIPDIR}/*:}
175
176.if !target(_DIRDEP_USE)
177# we did not read dirdeps.mk above, the target may be here
178.include "Makefile.xtras"
179.endif
180
181.else
182# dirdeps does it all
183all:
184.endif # .MAKE.LEVEL == 0
185
169.if !target(_DIRDEP_USE)
170# we did not read dirdeps.mk above, the target may be here
171.include "Makefile.xtras"
172.endif
173
174.else
175# dirdeps does it all
176all:
177.endif # .MAKE.LEVEL == 0
178