Skip to content

Instantly share code, notes, and snippets.

@dperuo
Last active Aug 7, 2018
Embed
What would you like to do?
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