bug-make
[Top][All Lists]
Advanced

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

[bug #14927] Fix for building archive members in parallel


From: Paul D. Smith
Subject: [bug #14927] Fix for building archive members in parallel
Date: Mon, 2 Jan 2023 16:18:16 -0500 (EST)

Follow-up Comment #5, bug #14927 (project make):

Of course the simplest thing to do is just avoid the library syntax altogether
and write the makefile as:

SRCS := a.c b.c
OBJS := $(SRCS:.c=.o)
LIB := mylib.a

$(LIB): $(OBJS) ; $(AR) -U cru $@ $?

This ensures that we build just object files and the library is updated at the
end, and parallel builds work fine.

The disadvantage to this is that the object files are not considered
intermediate, and so they are left behind after the build completes rather
than being deleted.  And of course we can't just declare them .INTERMEDIATE
because it means that any time we modify one source file, make will have to
rebuild them all.

Is that the requirement here, that we be able to treat these object files as
intermediate?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?14927>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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