Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Makefile cheatsheet

📅 2020-Jan-14 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 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.