I have a problem with GNU make when using [Archive Members as
Targets](https://www.gnu.org/software/make/manual/html_node/Archive-Members.html#Archive-Members).
The problem is that on some machines (e.g. running MacOS, Solaris) it works
fine, i.e. builds the library and the next `make` gives `Nothing to be done for
'all'`.
But not on the Linux boxes there make always rebuild everything. On all
machines I am using GNU Make.
Here the example with one source file `foo.c` and the `Makefile`
foo.c
```
void foo() {}
```
Makefile
```
all: libfoo.a
libfoo.a(%.o) : %.o
$(AR) cr $@ $^
libfoo.a: libfoo.a(foo.o)
ranlib libfoo.a
```
Run on Solaris
```
theon$ make
gcc -c -o foo.o foo.c
ar cr libfoo foo.o
ranlib libfoo
rm foo.o
theon$ make
make: Nothing to be done for 'all'.
```
Run on Linux
```
acker$ make
gcc -c -o foo.o foo.c
ar cr libfoo foo.o
ranlib libfoo
rm foo.o
acker$ make
gcc -c -o foo.o foo.c
ar cr libfoo foo.o
ranlib libfoo
rm foo.o
```
Can anyone confirm that? (or tell me what obvious stupid mistake I have done …?)
Best regards,
Michael