sigs.k8s.io/cluster-api-provider-azure@v1.14.3/docs/book/Makefile (about)

     1  # Copyright 2020 The Kubernetes 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 implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  # Directories.
    16  ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
    17  TOOLS_DIR := ../../hack/tools
    18  TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
    19  BIN_DIR := bin
    20  
    21  # Binaries.
    22  TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
    23  $(TABULATE): $(TOOLS_DIR)/go.mod
    24  	cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-tabulate ./mdbook/tabulate
    25  
    26  EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
    27  $(EMBED): $(TOOLS_DIR)/go.mod
    28  	cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-embed ./mdbook/embed
    29  
    30  RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
    31  $(RELEASELINK): $(TOOLS_DIR)/go.mod
    32  	cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/mdbook-releaselink ./mdbook/releaselink
    33  
    34  .PHONY: serve
    35  serve:
    36  	/tmp/mdbook serve
    37  
    38  build:
    39  	./install-and-build.sh