diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2014-11-30 00:20:20 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2014-11-30 00:20:20 +0000 |
commit | b6209a9b5861cbf265a23afeac999cb27bfc7eae (patch) | |
tree | cccfb1631d9c3b519238efb58e573405281c0762 /targets/Makefile.xtras | |
parent | f1382cffe7703a142e8eea88242485a577c1aeb2 (diff) | |
download | src-b6209a9b5861cbf265a23afeac999cb27bfc7eae.tar.gz src-b6209a9b5861cbf265a23afeac999cb27bfc7eae.zip |
Rename pkgs to more generic targets (that's what they are)
Reviewed by: marcel
Notes
Notes:
svn path=/projects/bmake/; revision=275282
Diffstat (limited to 'targets/Makefile.xtras')
-rw-r--r-- | targets/Makefile.xtras | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/targets/Makefile.xtras b/targets/Makefile.xtras new file mode 100644 index 000000000000..358f5ddec537 --- /dev/null +++ b/targets/Makefile.xtras @@ -0,0 +1,48 @@ +# $FreeBSD$ +# +# Makefile.xtras - non-build targets + +# Resist the urge to fill this with miscellaneous junk + +# We are not building here (shouldn't be), so no meta mode. +.MAKE.MODE = normal + +_here := ${_PARSEDIR} + +.MAIN: no-default + +no-default: + @echo "ERROR: there is no supported default target."; \ + echo "Try 'mk help'" + + +.if make(show-valid-targets) +OTHER_TARGETS = \ + destroy \ + +BUILD_TARGETS != cd ${_here} && \ + find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE:T} \) | \ + sed 's,/Makefile.*,,;s,^./,,' | sort -u + +show-valid-targets: + @echo "Build targets for ${MACHINE}:"; echo "${BUILD_TARGETS:ts\n}" + @echo; echo "Other targets:"; echo "${OTHER_TARGETS:ts\n}" +.endif + +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 "For other information, read: ${HELP_DOCS:@d@${.newline}$d@}"; \ + echo + +not-valid-target: + @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}." + + +.for t in ${_TARGETS:Nlove} +.if !target($t) +$t: not-valid-target show-help +.endif +.endfor |