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
all: target1 target2 | |
target1: | |
@echo "Running $@" | |
target2: | |
@echo "Running $@" |
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
all: | |
@echo "No target goes here" | |
target%: | |
@echo "\"\$$@\" = $@" | |
@echo "\"\$$*\" = $*" | |
@echo "\$$@ =" $@ | |
@echo "\$$* =" $* |
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
WGET_PATH := /wrong/path | |
ifeq ($(WGET_PATH), /wrong/path) | |
WGET_PATH := /usr/bin/wget | |
endif | |
all:;@echo $(WGET_PATH) |
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
$(error Something is wrong here) | |
all:;@echo "success" |
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
PATHS=$(wildcard /usr/bin/*) | |
all:;@echo $(PATHS); |
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
TIMESTAMP := $(shell date +%s) | |
all:;@echo $(TIMESTAMP); |
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
A := "A" | |
B += "B" | |
all:;@echo $(A); |
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
A := | |
A ?= "A" | |
all:;@echo $(A) |
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
A := "A" | |
B := $(A) | |
all:;@echo $(B) |
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
A = $(B) | |
B = "B" | |
all:;@echo $(A) |