The use of make comes from a C background, where you compile files and create a directory or a compiled file.

For example, consider this setup.

  • Makefile
      out:
        mkdir -p out
        cp public/* out
    

If the out directory does not exist, then all the commands will be run.

$ make out
mkdir -p out
cp public/* out

If it does exist, then all the steps will be skipped.

$ make out
make: `out' is up to date.

If you want the command to always run and ignore the existence of directory or the updated file a compiled file, add it your the phony setup.

  • `Makefile
    .PHONY: out
    

Now if you run this repeately, all the steps will be run.

$ make out