Created
November 19, 2016 11:25
-
-
Save graphicsminded/c611bf374dc9fb0ee8f6bcfd959d8929 to your computer and use it in GitHub Desktop.
New Project Makefile
This file contains 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
# Makefile for Scott Nunemacher | |
# Makefile format: | |
# target: dependencies | |
# actions | |
# By default, make these targets | |
all: newest.txt not-newest.txt variable-content.txt | |
# Clean out all of our previously made text files | |
clean: | |
@rm -rf *.txt | |
# Write out the content of newest.txt | |
# ('$@' is a macro for the target filename) | |
newest.txt: | |
@echo "This is the newest text file called $@." > $@ | |
# Write the contents of the dependency to the target file | |
# ('$<' is a macro for the first dependecy's filename | |
not-newest.txt: newest.txt | |
@cat $< > $@ | |
VARCONTENT = "Some content stored in a variable" | |
variable-content.txt: | |
@echo "$(VARCONTENT)" > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment