Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Makefile cheatsheet

📅 2020-Jan-14 ⬩ ✍️ 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)

© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email