Skip to content

Instantly share code, notes, and snippets.

@ingramj
Created March 12, 2012 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ingramj/2023883 to your computer and use it in GitHub Desktop.
Save ingramj/2023883 to your computer and use it in GitHub Desktop.
# print-clean.sh
targets=`grep '^.*:' Makefile | cut -d: -f1` # this isn't a general solution
echo rm -f $targets
# Makefile
a:
echo 'contents of a' > $@
clean:
sh print-clean.sh > $@
sh ./$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment