Last active
October 16, 2015 07:06
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 without defining .DEFAULT_GOAL, | |
# Default goal is the target of the first rule. | |
# Query the default goal. | |
ifeq ($(.DEFAULT_GOAL),) | |
$(warning no default goal is set) | |
endif | |
.PHONY: foo | |
foo: ; @echo $@ | |
$(warning default goal is $(.DEFAULT_GOAL)) | |
.PHONY: bar | |
bar: ; @echo $@ | |
$(warning default goal is $(.DEFAULT_GOAL)) | |
#S@: Gives the name of the target of the rule. | |
#Command: | |
#make | |
#Output: | |
#Makefile:5: no default goal is set | |
#Makefile:9: default goal is foo | |
#foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment