Skip to content

Instantly share code, notes, and snippets.

@ingramj
Created March 12, 2012 18:42
Show Gist options
  • 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