github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/Makefile (about)

     1  # Copyright 2017 The Cockroach Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    12  # implied. See the License for the specific language governing
    13  # permissions and limitations under the License.
    14  
    15  # This is a convenience Makefile which defers all real work to the top-level
    16  # Makefile. The % rule is run for any target specified on the command line. We
    17  # use the builtin MAKECMDGOALS (the command line targets) to perform our
    18  # recursive make invocation. Lastly, we take care to give all specified goals
    19  # a "ui-" prefix.
    20  #
    21  # We use a level of indirection through the "default" rule so that specifying
    22  # multiple targets on the command line (e.g. "make test lint") does not result
    23  # in multiple invocations of the rule.
    24  
    25  MAKECMDGOALS ?= lint test $(GOBINDATA_TARGET)
    26  
    27  %: default ;
    28  
    29  .PHONY: default
    30  default:
    31  	@$(MAKE) -C ../.. $(addprefix ui-,$(MAKECMDGOALS))