Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Makefile cheatsheet

📅 2020-Jan-15 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cheatsheet, makefile ⬩ 📚 Archive

ifneq ("$(wildcard $(SOME_PATH_VAR))","")

Here we are applying the wildcard function on the variable holding a path or a wildcard to expand it to a list of files or directories. We then check if this list is not empty by comparing it to an empty string with the ifneq if-not-equal check.

$(info This text will be printed and execution continues)

$(warning This text will be printed as a warning)

$(error This text will print as error and make will exit)