freebsd-skq/contrib/bmake/unit-tests/opt-query.mk
Simon J. Gerraty e2eeea75eb Merge bmake-20201117
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
  checks in InitObjdir.  Explicit .OBJDIR target always allows
  read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after:	1 week
2020-11-20 06:02:31 +00:00

27 lines
760 B
Makefile

# $NetBSD: opt-query.mk,v 1.4 2020/11/09 20:50:56 rillig Exp $
#
# Tests for the -q command line option.
#
# The -q option only looks at the dependencies between the targets.
# None of the commands in the targets are run, not even those that are
# prefixed with '+'.
.MAKEFLAGS: -q
# This command cannot be prevented from being run since it is used at parse
# time, and any later variable assignments may depend on its result.
!= echo 'command during parsing' 1>&2; echo
# None of these commands are run.
.BEGIN:
@echo '$@: hidden command'
@+echo '$@: run always'
# None of these commands are run.
all:
@echo '$@: hidden command'
@+echo '$@: run always'
# The exit status 1 is because the "all" target has to be made, that is,
# it is not up-to-date.