Message ID | pull.1810.v2.git.1728667787227.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ea3422662d21c33c349cc71e9cdbfe235e8f6905 |
Headers | show |
Series | [v2] Makefile: fix dependency for $(UNIT_TEST_DIR)/clar/clar.o | expand |
On Fri, Oct 11, 2024 at 05:29:47PM +0000, Philippe Blain via GitGitGadget wrote: > From: Philippe Blain <levraiphilippeblain@gmail.com> > > The clar source file '$(UNIT_TEST_DIR)/clar/clar.c' includes the > generated 'clar.suite', but this dependency is not taken into account by > our Makefile, so that it is possible for a parallel build to fail if > Make tries to build 'clar.o' before 'clar.suite' is generated. > > Correctly specify the dependency. > > Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Thanks, this version looks good to me. Patrick
On Mon, Oct 14, 2024 at 01:59:25PM +0200, Patrick Steinhardt wrote: > On Fri, Oct 11, 2024 at 05:29:47PM +0000, Philippe Blain via GitGitGadget wrote: > > From: Philippe Blain <levraiphilippeblain@gmail.com> > > > > The clar source file '$(UNIT_TEST_DIR)/clar/clar.c' includes the > > generated 'clar.suite', but this dependency is not taken into account by > > our Makefile, so that it is possible for a parallel build to fail if > > Make tries to build 'clar.o' before 'clar.suite' is generated. > > > > Correctly specify the dependency. > > > > Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> > > Thanks, this version looks good to me. Thanks, both. Junio had already marked this one to merge to 'next', so I will go ahead and merge it down in the next integration cycle (which should be tomorrow, assuming I remember how to do it correctly). Thanks, Taylor
diff --git a/Makefile b/Makefile index 2dde1fd2b8b..76926537ccd 100644 --- a/Makefile +++ b/Makefile @@ -3910,6 +3910,7 @@ $(UNIT_TEST_DIR)/clar-decls.h: $(patsubst %,$(UNIT_TEST_DIR)/%.c,$(CLAR_TEST_SUI done >$@ $(UNIT_TEST_DIR)/clar.suite: $(UNIT_TEST_DIR)/clar-decls.h $(QUIET_GEN)awk -f $(UNIT_TEST_DIR)/clar-generate.awk $< >$(UNIT_TEST_DIR)/clar.suite +$(UNIT_TEST_DIR)/clar/clar.o: $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS): $(UNIT_TEST_DIR)/clar-decls.h $(CLAR_TEST_OBJS): EXTRA_CPPFLAGS = -I$(UNIT_TEST_DIR) $(CLAR_TEST_PROG): $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS) $(GITLIBS) GIT-LDFLAGS