3 # Makefile.xtras - non-build targets
5 # Resist the urge to fill this with miscellaneous junk
7 # We are not building here (shouldn't be), so no meta mode.
17 MAKE_MACHINE_CMD= mk --machine <machine>
21 MAKE_MACHINE_CMD= env MACHINE=<machine> ${.MAKE:T}
25 @echo "ERROR: there is no supported default target."; \
26 echo "Try '${MAKE_CMD} help'"
29 .if make(show-valid-targets)
36 BUILD_TARGETS != cd ${_here} && \
37 find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE:T} \) | \
38 sed 's,/Makefile.*,,;s,^./,,' | sort -u
40 BUILD_TARGETS_HOST != cd ${_here} && \
41 find . \( -name Makefile.depend.host -o -name ${.MAKE.DEPENDFILE:T}.host \) | \
42 sed 's,/Makefile.*,,;s,^./,,' | sort -u
45 .if !empty(BUILD_TARGETS_HOST)
46 @echo "Build targets for host (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):"
47 @echo "${BUILD_TARGETS_HOST:O:ts\n}"
50 @echo "Build targets for ${MACHINE} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):"
51 @echo "${BUILD_TARGETS:O:ts\n}"
52 @echo; echo "Other targets:"; echo "${OTHER_TARGETS:O:ts\n}"
58 echo "You can see the targets which are valid for a given machine"; \
59 echo "by running '${MAKE_MACHINE_CMD} show-valid-targets'"; \
60 echo "For other information, read: ${HELP_DOCS:@d@${.newline}$d@}"; \
64 @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}."
70 .for t in ${_TARGETS:Nlove}
72 $t: not-valid-target show-help