Re: About make manual 11.3 a(m) syntax in prerequisite

2024-12-27 Thread lijh8
Hi Paul, The ar option `U` works on debian 12 unstable. Thanks. ``` ARFLAGS = rvU (%) : % ; %.a : ; $(AR) $(ARFLAGS) $@ $? libfoo.a: libfoo.a($(patsubst %.c,%.o,$(wildcard *.c)))  ``` $ ar --version GNU ar (GNU Binutils for Debian) 2.43.50.20241221 $ 

Re: About make manual 11.3 a(m) syntax in prerequisite

2024-12-27 Thread Paul Smith
On Fri, 2024-12-27 at 17:03 +0800, lijh8 wrote: > but if i use ` a(m) ` syntax in the prerequisites,  > it rebuilds the archive even i did not change the `*.c` source files > or the `*.o` object files. You didn't give us any indication of your operating system or distribution, or what version of a

About make manual 11.3 a(m) syntax in prerequisite

2024-12-27 Thread lijh8
Hi community, ``` # gnu make 11.3 , # https://www.gnu.org/software/make/manual/make.html#Archive-Pitfalls , # Makefile (%) : % ; %.a : ; $(AR) $(ARFLAGS) $@ $? # libfoo.a: libfoo.a($(patsubst %.c,%.o,$(wildcard *.c))) libfoo.a: $(patsubst %.c,%.o,$(wildcard *.c))  ``` if i do not use ` a(m) ` s