help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recursively expanded variables in targets?


From: Angel Tsankov
Subject: Recursively expanded variables in targets?
Date: Sat, 29 Oct 2005 10:32:26 +0300

Consider the following makefile:

###############################################################################

build_target    := ''
target_folder    = Builds/$(build_target)

all: set_vars build
@echo $(target_folder)

set_vars:
$(eval build_target := $(patsubst %,debug,''))

build: $(target_folder)/a.out

$(target_folder)/a.out:
@echo $@

###############################################################################

make produces the following output when I execute make all (or just
make):
Builds//a.out
Builds/debug

Is it possible to produce
Builds/debug/a.out
Builds/debug

If so, how?

Angel Tsankov
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]