lldb(1): Document core file option -c / -core
[freebsd-src.git] / targets / Makefile.xtras
blob57a04532812ce9b65e7de200837bc2373bd80910
1 # $FreeBSD$
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.
8 .MAKE.MODE = normal
10 _here := ${_PARSEDIR}
12 .MAIN: no-default
14 .if !empty(SB_NAME)
15 # mk wrapper
16 MAKE_CMD= mk
17 MAKE_MACHINE_CMD= mk --machine <machine>
18 .else
19 # not using 'mk'
20 MAKE_CMD= ${.MAKE:T}
21 MAKE_MACHINE_CMD= env MACHINE=<machine> ${.MAKE:T}
22 .endif
24 no-default:
25         @echo "ERROR: there is no supported default target."; \
26         echo "Try '${MAKE_CMD} help'"
29 .if make(show-valid-targets)
30 OTHER_TARGETS = \
31         destroy \
33 BUILD_TARGETS != cd ${_here} && \
34         find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE:T} \) | \
35         sed 's,/Makefile.*,,;s,^./,,' | sort -u
37 show-valid-targets:
38         @echo "Build targets for ${MACHINE} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):"
39         @echo "${BUILD_TARGETS:ts\n}"
40         @echo; echo "Other targets:"; echo "${OTHER_TARGETS:ts\n}"
41 .endif
43 help: show-help
44 show-help:
45         @echo; \
46         echo "You can see the targets which are valid for a given machine"; \
47         echo "by running '${MAKE_MACHINE_CMD} show-valid-targets'"; \
48         echo "For other information, read: ${HELP_DOCS:@d@${.newline}$d@}"; \
49         echo
51 not-valid-target:
52         @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}."
55 .for t in ${_TARGETS:Nlove}
56 .if !target($t)
57 $t: not-valid-target show-help
58 .endif
59 .endfor