diff options
author | Björn Gustavsson <[email protected]> | 2011-06-29 08:09:21 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-08-08 11:59:11 +0200 |
commit | 8d3a2dfa646ab2ceb41905c673adb15e57bf9cfd (patch) | |
tree | b27c6d43f8c61eab0069d6f6466cee6d78d149d5 /lib/os_mon/c_src | |
parent | 13cc114325d31626a84fbecbe07bb0f76c3726cf (diff) | |
download | otp-8d3a2dfa646ab2ceb41905c673adb15e57bf9cfd.tar.gz otp-8d3a2dfa646ab2ceb41905c673adb15e57bf9cfd.tar.bz2 otp-8d3a2dfa646ab2ceb41905c673adb15e57bf9cfd.zip |
*/c_src/Makefile*: Support parallel make
Create directories first, not within implicit rules. If two
'install' instances runs at the same time attempting to create
a directory, one of them may fail with an "File exists" error.
I tried to use order-only prerequisites to create the directories,
but run into two problems: First, order-only prerequisites are
only implemented in Make 3.80 and later. Second, on a computer
running Solaris/Intel 2.8 (with Make 3.80), order-only prerequisites
seemed to work like ordinary prerequisites, causing targets to
be re-built if the timestamp for the directory changed.
Therefore, using a shell command to run mkdir seems to be the
more portable solution.
Diffstat (limited to 'lib/os_mon/c_src')
-rw-r--r-- | lib/os_mon/c_src/Makefile.in | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/os_mon/c_src/Makefile.in b/lib/os_mon/c_src/Makefile.in index 1a371eb380..b81d3f564b 100644 --- a/lib/os_mon/c_src/Makefile.in +++ b/lib/os_mon/c_src/Makefile.in @@ -82,13 +82,9 @@ ALL_CFLAGS = @CFLAGS@ @DEFS@ $(CFLAGS) # Targets # ---------------------------------------------------- -debug opt: $(OBJDIR) $(BINDIR) $(TARGET_FILES) +_create_dirs := $(shell mkdir -p $(OBJDIR) $(BINDIR)) -$(OBJDIR): - -@mkdir -p $(OBJDIR) - -$(BINDIR): - -@mkdir -p $(BINDIR) +debug opt: $(TARGET_FILES) clean: rm -f $(TARGET_FILES) |