Last active
August 29, 2015 14:25
-
-
Save infotroph/2f53db2f610730abe27a to your computer and use it in GitHub Desktop.
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
# Have a set of Make rules that produce some outputs I usually want to keep, | |
# and some cruft I only want when debugging. | |
# Want cruft removed at the end of every successful build, | |
# and outputs AND cruft removed on $(make clean). | |
# This version appears to do all these things, but I welcome more feedback if something looks wrong. | |
OUTPUTS = \ | |
# bunch of compiled end products here | |
JUNK = \ | |
*.hi | |
*.o | |
*.aux | |
*.out | |
all: $(OUTPUTS) clean-intermediates | |
# non-phony rules not shown; all appear to work as intended | |
.PHONY: all clean-intermediates clean | |
clean-intermediates: | |
rm -f $(JUNK) | |
clean: clean-intermediates | |
rm -f $(OUTPUTS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment