how to run makefile in linux code example

Example 1: run sh from terminal mac

chmod +x fileName
bash fileName

Example 2: python run a system command

import os
cmd = "git --version"
returned_value = os.system(cmd)  # returns the exit code in unix

Example 3: make file creation

hello: hello.c
    ${CC} hello.c -o hello

Example 4: how to compile ts in cmd

"scripts": {
    "clean": "rimraf dist",
    "start": "npm-run-all clean --parallel watch:build watch:server --print-label",
    "watch:build": "tsc --watch",
    "watch:server": "nodemon './dist/index.js' --watch './dist'"
}

Tags:

Java Example