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
41 @echo "Build targets for ${MACHINE} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):"
42 @echo "${BUILD_TARGETS:ts\n}"
43 @echo; echo "Other targets:"; echo "${OTHER_TARGETS:ts\n}"
49 echo "You can see the targets which are valid for a given machine"; \
50 echo "by running '${MAKE_MACHINE_CMD} show-valid-targets'"; \
51 echo "For other information, read: ${HELP_DOCS:@d@${.newline}$d@}"; \
55 @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}."
61 .for t in ${_TARGETS:Nlove}
63 $t: not-valid-target show-help