https://news.ycombinator.com/item?id=37615272
Hacker News new | past | comments | ask | show | jobs | submit login Makefile Tutorial ( makefiletutorial.com ) 61 points by hasheddan 2 hours ago | hide | past | favorite | 17 comments stabbles 18 minutes ago | next [–] This tutorial is out of date: # Search for the "-i" flag. MAKEFLAGS is just a list of single characters, one per flag. So look for "i" in this case. ifneq (,$(findstring i, $(MAKEFLAGS))) echo "i was passed to MAKEFLAGS" endif As of GNU Make 4.4 (Oct 2022) it gives false positives; from the release notes: * WARNING: Backward-incompatibility! Previously only simple (one-letter) options were added to the MAKEFLAGS variable that was visible while parsing makefiles. Now, all options are available in MAKEFLAGS. If you want to check MAKEFLAGS for a one-letter option, expanding "$(firstword -$(MAKEFLAGS))" ...