Last active
August 7, 2018 13:40
-
-
Save dperuo/3a3c542392dcbba1d439 to your computer and use it in GitHub Desktop.
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
INPUT := myfile | |
OUTPUT := myfile2 | |
.PHONY: all | |
all: $(OUTPUT) | |
$(OUTPUT): $(INPUT) | |
cp $^ $@ | |
$(INPUT): | |
touch $@ | |
.PHONY: test | |
test: | |
@if [[ ! -a $(OUTPUT) ]]; \ | |
then echo "$(MAKE) will make $(OUTPUT)"; \ | |
else echo "$(OUTPUT) exits!"; \ | |
fi | |
.PHONY: clean | |
clean: | |
$(RM) $(INPUT) | |
$(RM) $(OUTPUT) | |
.INTERMEDIATE: $(INPUT) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment