Skip to content

Commit

Permalink
Fix race in Makefile.in
Browse files Browse the repository at this point in the history
The usage of ranlib in sdkstatic target could race with other targets, leading to compiler errors. This commit fixes it.
  • Loading branch information
kxxt committed Nov 20, 2024
1 parent 703438d commit da2d66f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ RDFGEN_TARGET = \
sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)

sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
$(RANLIB) $(SDK_STATIC)
$(RANLIB) $(HOSTSDK_STATIC)

plugins: $(PLUGIN_TARGET)

Expand All @@ -251,9 +249,11 @@ all: sdk plugins host rdfgen test

$(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(AR) r $@ $(SDK_OBJECTS)
$(RANLIB) $(SDK_STATIC)

$(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
$(AR) r $@ $(HOSTSDK_OBJECTS)
$(RANLIB) $(HOSTSDK_STATIC)

$(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
$(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
Expand Down

0 comments on commit da2d66f

Please sign in to comment.