|
From: | Oleksandr Gavenko |
Subject: | Re: Problem with Make 3.82 and wilcard in prerequisite for directories |
Date: | Fri, 09 Nov 2012 19:22:41 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
On 2012-11-09, Bastian Beischer wrote: > %.o: ./*/%.c > COMPILE... Very danger construction. It is not documented by 'info make'. You can rewrite your rule to: %.o: %.c COMPILE... and handle complete build by: C_FILES := $(wildcard */*.c */*/*.c */*/*/*.c) O_FILES := $(C_FILES:.c=.o) %.o: %.c COMPILE... $(APP): $(O_FILES) LINK... The only difference - all .o files put to corresponding subdirs instead root dir. If you still want put it to any dir write: .PHONY: copy-to-root copy-to-root: $(O_FILES) cp $^ . but you loose make dependencies tracking... -- Best regards!
[Prev in Thread] | Current Thread | [Next in Thread] |