1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

* build/program.mk, Makefile.in: Fix a parallel build failure where

test/httpdunit could be linked before buildmark.o exists.  buildmark.o
  is named in $(PROGRAM_LDADD) but was only created as a side effect of
  the httpd link rule, so give it an explicit rule and make both httpd
  and test/httpdunit depend on it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes #721


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937575 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2026-08-28 13:41:33 +00:00
parent 32a7b89be0
commit cab74724ef
2 changed files with 9 additions and 2 deletions

View File

@@ -533,7 +533,7 @@ test/httpdunit.lo: test/httpdunit.c test/httpdunit.cases | unittest-objdir
# libcheck on the system.
httpdunit_OBJECTS := test/httpdunit.lo $(testcase_OBJECTS)
$(httpdunit_OBJECTS): override LTCFLAGS += $(UNITTEST_CFLAGS)
test/httpdunit: $(httpdunit_OBJECTS) $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
test/httpdunit: $(httpdunit_OBJECTS) $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS) buildmark.o
$(LINK) $(httpdunit_OBJECTS) $(PROGRAM_OBJECTS) $(UNITTEST_LIBS) $(PROGRAM_LDADD)
check-unittests: test/httpdunit

View File

@@ -18,6 +18,13 @@
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
# buildmark.o is named in $(PROGRAM_LDADD), so give it an explicit rule
# rather than building it as a side effect of the link below: other targets
# which use $(PROGRAM_LDADD) can then depend on it, instead of racing
# against this rule under "make -j". Rebuilding it whenever the program is
# relinked keeps the reported build timestamp current.
buildmark.o: $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
$(PROGRAM_PRELINK)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS) buildmark.o
$(LINK) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)