History

Fix errors with parallel make

seen when doing 'make -j i386-tcc tcc', as explained in the comment.

Michael Matz committed 5 years ago

Commit cc403051 parent 16ed6751 file · +7 −1Browse files

Unified · Split

Makefile+7−1
@@ -236,7 +236,13 @@ tcc$(EXESUF): tcc.o $(LIBTCC) · 235 unmodified lines
236236 $S$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) $(LINK_LIBTCC)
237237
238238 # Cross Tiny C Compilers
239−%-tcc$(EXESUF): FORCE
239+# (the TCCDEFS_H dependency is only necessary for parallel makes,
240+# ala 'make -j x86_64-tcc i386-tcc tcc', which would create multiple
241+# c2str.exe and tccdefs_.h files in parallel, leading to access errors.
242+# This forces it to be made only once. Make normally tracks multiple paths
243+# to the same goals and only remakes it once, but that doesn't work over
244+# sub-makes like in this target)
245+%-tcc$(EXESUF): $(TCCDEFS_H) FORCE
240246 @$(MAKE) --no-print-directory $@ CROSS_TARGET=$* ONE_SOURCE=$(or $(ONE_SOURCE),yes)
241247
242248 $(CROSS_TARGET)-tcc$(EXESUF): $(TCC_FILES)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t