Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Make Cheatsheet

📅 2019-Dec-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cheatsheet, make ⬩ 📚 Archive

$ make -n

This prints all the commands that would be executed, without actually executing them.

$ make -p
$ make -p -f/dev/null
$ make -w

This is useful, for example, to know which specific Makefile from a subdirectory is being used for running a specific command.

$ make -qp | awk -F ':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | sort -u

References


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧