Browse Source

TT#84350 fix make races

On some systems (e.g. Github Travis) make seems to have a problem with
its job control, resulting in a race condition where multiple make
instances try to build the same file at the same time. For most files
this is not a problem, but those auto-generated using an append
operation (>>) the output file can become garbled. Solve this by using
an atomic file creation method.

Change-Id: I1acb2387e2ca6ca30ddc3742143fd910032bfbb0
changes/40/41040/2
Richard Fuchs 6 years ago
parent
commit
92ee64f760
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      lib/common.Makefile

+ 4
- 6
lib/common.Makefile View File

@ -25,14 +25,12 @@ install:
$(OBJS): Makefile
$(LIBSRCS): $(patsubst %,../lib/%,$(LIBSRCS))
rm -f "$@"
echo '/******** GENERATED FILE ********/' > "$@"
cat ../lib/"$@" >> "$@"
( echo '/******** GENERATED FILE ********/' && \
cat ../lib/"$@" ) > "$@"
$(DAEMONSRCS) $(HASHSRCS): $(patsubst %,../daemon/%,$(DAEMONSRCS)) $(patsubst %,../daemon/%,$(HASHSRCS))
rm -f "$@"
echo '/******** GENERATED FILE ********/' > "$@"
cat ../daemon/"$@" >> "$@"
( echo '/******** GENERATED FILE ********/' && \
cat ../daemon/"$@" ) > "$@"
%.8: %.pod
pod2man \


Loading…
Cancel
Save