Skip to content

Commit

Permalink
ICU-21172 fix install race
Browse files Browse the repository at this point in the history
The generic recursive target calls target-local so also adding it to the
dependency list results in races due to install-local being executed twice in
parallel.  For example, install-manx can fail if the two install processes race
and one process tries to chown a file that the other process has just deleted.

Also install-manx should be a phony target, and for clarity use $^ instead of $?
in the install command.

Signed-off-by: Ross Burton <ross.burton@arm.com>
  • Loading branch information
rossburton authored and markusicu committed Sep 24, 2024
1 parent 60d6bd7 commit 0f022dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions icu4c/source/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ EXTRA_DATA =

## List of phony targets
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
install-recursive clean clean-local clean-recursive distclean \
install-recursive install-manx clean clean-local clean-recursive distclean \
distclean-local distclean-recursive doc dist dist-local dist-recursive \
check check-local check-recursive clean-recursive-with-twist install-icu \
doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
Expand All @@ -88,9 +88,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist

## List of standard targets
all: all-local all-recursive
install: install-recursive install-local
install: install-recursive
clean: clean-recursive-with-twist clean-local
distclean : distclean-recursive distclean-local
distclean : distclean-recursive
dist: dist-recursive
check: all check-recursive
check-recursive: all
Expand Down Expand Up @@ -377,7 +377,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
install-manx: $(MANX_FILES)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
ifneq ($(MANX_FILES),)
$(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
$(INSTALL_DATA) $^ $(DESTDIR)$(mandir)/man$(SECTION)
endif

config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
Expand Down

0 comments on commit 0f022dc

Please sign in to comment.