[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a way to work around the following oddity with % in GNU Mak
From: |
Steve Simmons |
Subject: |
Re: Is there a way to work around the following oddity with % in GNU Make? |
Date: |
Thu, 29 Sep 2005 17:38:38 GMT |
User-agent: |
slrn/0.9.8.0 (Linux) |
Andrew <arkoenig@gmail.com> wrote on 09/28/05 at 18:31:
> %.exe: %.o
> $(CC) -o $@ $^
> Subsequently in the same makefile, I would like to add lib.o as a
> dependency to every .exe file in this directory, which one would think
> I could do by saying
> %.exe: lib.o
> This doesn't work because it overrides the previous rule.
Have you tried wildcard expansions? If foo.exe exists and is older
than lib.o, this works as expected:
$(wildcard *.exe): lib.o
echo success