diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-05-29 06:44:09 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-05-29 06:44:09 +0000 |
commit | f49116fcd96f2420f604c904ef63ccced77adc2a (patch) | |
tree | 8c8f4831b892d55e3639b9e79cfe56ff90d42045 /targets/Makefile.xtras | |
parent | 98e0ffaefb0f241cda3a72395d3be04192ae0d47 (diff) | |
download | src-f49116fcd96f2420f604c904ef63ccced77adc2a.tar.gz src-f49116fcd96f2420f604c904ef63ccced77adc2a.zip |
Adapt based on whether 'mk' wrapper is used.
If 'mk' is used we can expect SB_NAME to be set.
Use 'mk' versions of command suggestions.
Otherwise 'make' version - a bit more cumbersom.
Notes
Notes:
svn path=/projects/bmake/; revision=283688
Diffstat (limited to 'targets/Makefile.xtras')
-rw-r--r-- | targets/Makefile.xtras | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/targets/Makefile.xtras b/targets/Makefile.xtras index 358f5ddec537..57a04532812c 100644 --- a/targets/Makefile.xtras +++ b/targets/Makefile.xtras @@ -11,9 +11,19 @@ _here := ${_PARSEDIR} .MAIN: no-default +.if !empty(SB_NAME) +# mk wrapper +MAKE_CMD= mk +MAKE_MACHINE_CMD= mk --machine <machine> +.else +# not using 'mk' +MAKE_CMD= ${.MAKE:T} +MAKE_MACHINE_CMD= env MACHINE=<machine> ${.MAKE:T} +.endif + no-default: @echo "ERROR: there is no supported default target."; \ - echo "Try 'mk help'" + echo "Try '${MAKE_CMD} help'" .if make(show-valid-targets) @@ -25,7 +35,8 @@ BUILD_TARGETS != cd ${_here} && \ sed 's,/Makefile.*,,;s,^./,,' | sort -u show-valid-targets: - @echo "Build targets for ${MACHINE}:"; echo "${BUILD_TARGETS:ts\n}" + @echo "Build targets for ${MACHINE} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):" + @echo "${BUILD_TARGETS:ts\n}" @echo; echo "Other targets:"; echo "${OTHER_TARGETS:ts\n}" .endif @@ -33,7 +44,7 @@ help: show-help show-help: @echo; \ echo "You can see the targets which are valid for a given machine"; \ - echo "by running 'mk --machine <machine> show-valid-targets'"; \ + echo "by running '${MAKE_MACHINE_CMD} show-valid-targets'"; \ echo "For other information, read: ${HELP_DOCS:@d@${.newline}$d@}"; \ echo |