Created
May 14, 2019 19:42
-
-
Save blockloop/19b6a243d335463598a8e2450b4672ea to your computer and use it in GitHub Desktop.
debug Makefiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unset TERMCAP | |
re_env=$(env | cut -d= -f1 | tr \\n '|') | |
re_dot_smthg='\.[^ ]+' | |
re_autovars='[%*+<?^@][^ ]' | |
re_misc='GNUMAKEFLAGS|MAKE([^ ]+)?|MFLAGS|SUFFIXES|-\*-command-variables-\*-' | |
make -rR -pk -q "$@" \ | |
| grep -Ev "^(${re_env}#|$re_dot_smthg|$re_autovars|$re_misc) " \ | |
| cat -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment