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

     1  # Generated with Cloud MTA Build Tool version 0.0.0
     2  version=0.0.0
     3  MBT=mbt
     4  ifndef p
     5  $(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
     6  endif
     7  target_provided=true
     8  ifndef t
     9  t="$(CURDIR)"
    10  target_provided=false
    11  endif
    12  ifndef strict
    13  strict=true
    14  endif
    15  ifndef mtar
    16  mtar="*"
    17  endif
    18  # List of all the recipes to be executed during the build process
    19  .PHONY: pre_validate pre_build validate ui meta mtar cleanup
    20  # Default target compile all
    21  all: pre_validate pre_build validate ui meta mtar cleanup
    22  # Validate mta.yaml
    23  pre_validate:
    24  	@$(MBT) validate -r=${strict} -x="paths"
    25  
    26  pre_build: pre_validate
    27  	@$(MBT) project build -p=pre
    28  
    29  # Set the current project repository path for general mta process
    30    PROJ_DIR := $(CURDIR)
    31  # List of modules
    32  modules = ui
    33  
    34  # Execute all modules builds
    35  # build module ui
    36  ui: validate
    37  	@echo 'INFO building the "ui" module...'
    38  	@$(MBT) execute -d="$(PROJ_DIR)/ui" -c='npm install' -c=grunt
    39  # Pack module build artifacts
    40  	@$(MBT) module pack -m=ui -p=${p} -t=${t}
    41  	@echo 'INFO finished building the "ui" module'
    42  
    43  # Create META-INF folder with MANIFEST.MF & mtad.yaml
    44  meta: $(modules) post_build
    45  	@$(MBT) gen meta -p=${p} -t=${t}
    46  
    47  post_build: $(modules)
    48  	@$(MBT) project build -p=post -t=${t}
    49  
    50  # Validate mta.yaml
    51  validate: pre_build
    52  	@$(MBT) validate -r=${strict}
    53  
    54  # Pack as MTAR artifact
    55  mtar: $(modules) meta
    56  	@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
    57  
    58  cleanup: mtar
    59  # Remove tmp folder
    60  	@$(MBT) clean -t=${t}