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 | 795f6ab3029b22f8ca3bc633d615d0843fb6f7e3 (patch) | |
tree | 6381b8c0361eaa00ae9fe03d0bd18c1434105aff /lib/megaco/src/flex/Makefile.in | |
parent | 8d3a2dfa646ab2ceb41905c673adb15e57bf9cfd (diff) | |
download | otp-795f6ab3029b22f8ca3bc633d615d0843fb6f7e3.tar.gz otp-795f6ab3029b22f8ca3bc633d615d0843fb6f7e3.tar.bz2 otp-795f6ab3029b22f8ca3bc633d615d0843fb6f7e3.zip |
megaco/src/flex/Makefile.in: Support parallel make
Make sure that directories are created before they are used.
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/megaco/src/flex/Makefile.in')
-rw-r--r-- | lib/megaco/src/flex/Makefile.in | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in index 5af651d89b..2c46a673e4 100644 --- a/lib/megaco/src/flex/Makefile.in +++ b/lib/megaco/src/flex/Makefile.in @@ -391,7 +391,9 @@ $(STD_DRV).c: $(STD_DRV).flex $(MT_DRV).c: $(MT_DRV).flex $(LEX) $(MT_LEX_FLAGS) -P$* -o$@ $< -solibs: $(LIBDIR) $(OBJDIR) $(SOLIBS) +_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR)) + +solibs: $(SOLIBS) $(OBJDIR)/$(STD_DRV).o: $(STD_DRV).c @echo "compiling std driver:" @@ -411,10 +413,3 @@ $(LIBDIR)/$(STD_DRV).$(DED_EXT): $(OBJDIR)/$(STD_DRV).o $(LIBDIR)/$(MT_DRV).$(DED_EXT): $(OBJDIR)/$(MT_DRV).o @echo "linking multi-threaded driver:" $(LD) $(LDFLAGS) -o $@ $< - -$(LIBDIR): - -mkdir -p $(LIBDIR) - -$(OBJDIR): - -mkdir -p $(OBJDIR) - |