mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Makefile.xtras: fix show-valid-targets
Use ALL_MACHINE_LIST and leverage .MAKE.DEPENDFILE_PREFERENCE
This commit is contained in:
parent
64a67b7266
commit
061e8e6ba6
@ -34,21 +34,20 @@ OTHER_TARGETS = \
|
||||
destroy-stage \
|
||||
|
||||
BUILD_TARGETS_${MACHINE:tu} != cd ${_here} && \
|
||||
find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE:T} \) | \
|
||||
find . \( ${${.MAKE.DEPENDFILE:T} ${.MAKE.DEPENDFILE_PREFIX}:L:O:u:@m@-name $m -o@:tW:S,-o$,,} \) | \
|
||||
sed 's,/Makefile.*,,;s,^./,,' | sort -u
|
||||
|
||||
.for _machine in ${all_machine_list}
|
||||
.for _machine in ${ALL_MACHINE_LIST}
|
||||
_targets_${_machine} != cd ${_here} && \
|
||||
find . \( -name Makefile.depend.${_machine} -o \
|
||||
-name ${.MAKE.DEPENDFILE:T}.${_machine} \) | \
|
||||
find . \( ${.MAKE.DEPENDFILE_PREFERENCE:T:M*${MACHINE}*:S,${MACHINE},${_machine},g:O:u:@m@-name $m -o@:tW:S,-o$,,} \) | \
|
||||
sed 's,/Makefile.*,,;s,^./,,' | sort -u
|
||||
BUILD_TARGETS_${_machine:tu} += ${_targets_${_machine}}
|
||||
.endfor
|
||||
|
||||
show-valid-targets:
|
||||
.for _machine in ${all_machine_list:O}
|
||||
.for _machine in ${ALL_MACHINE_LIST:O}
|
||||
.if !empty(BUILD_TARGETS_${_machine:tu})
|
||||
@echo "Build targets for ${_machine} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):"
|
||||
@echo "Build targets for ${_machine} (leave out the ${DIRDEPS_TARGETS_DIRS:S,${_here:T},,:S,^/,,:S,$,/,}):"
|
||||
@echo -e "${BUILD_TARGETS_${_machine:tu}:O:ts\n}" | sed -e 's,^, ,'
|
||||
@echo
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user