github.com/SAP/cloud-mta-build-tool@v1.2.27/internal/tpl/testdata/WrongMakeTmpl.txt (about)

     1  # Create folder for build artifacts
     2  MTR_DIR := $(shell $(MBT) execute prepare)
     3  # List of all the recipes to be executed
     4  .PHONY: cores {{- range .File.Modules}} {{.Name}}{{end}} meta mtar cleanup
     5  # Default target compile all
     6  all: cores {{- range .File.Modules}} {{.Name}}{{end}} meta mtar cleanup
     7  # All modules execution
     8  modules = {{- range .File.Modules}} {{.Name}}{{end}}
     9  # Set the current project repository path for general mta process
    10    PROJ_DIR := $(CURDIR)
    11  
    12  # Execute all modules builds
    13  
    14  {{- range .File.Modules}}
    15  # build module {{.Name}}
    16  {{.Name}}:
    17  {{"\t"}}cd $(PROJ_DIR)/{{.Path}} && {{with $cmds := CommandProvider1 .}}{{range $i, $cmd:=$cmds.Command}}{{if gt $i 0 }} && {{end}}{{.}}{{end}}{{end}}
    18  # Pack module build artifacts
    19  {{"\t"}}@$(MBT) execute pack $(MTR_DIR) {{.Path}} {{.Name}}
    20  {{end}}
    21  # Create META-INF folder with MANIFEST.MF & mtad.yaml
    22  meta:
    23  {{"\t"}}@$(MBT) execute meta $(MTR_DIR)
    24  
    25  # Pack as MTAR artifact
    26  mtar: $(modules) meta
    27  {{"\t"}}@$(MBT) execute mtar $(MTR_DIR) $(PROJ_DIR)
    28  
    29  cleanup: mtar
    30  # Remove tmp folder
    31  {{"\t"}}@$(MBT) execute clean $(MTR_DIR)
    32  
    33  # Print available cores for parallel execution
    34  cores:
    35  {{"\t"}}@echo $(NPROCS)