automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [FYI] [ng] yacc, lex: avoid extra forks in non-VPATH build


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] yacc, lex: avoid extra forks in non-VPATH builds
Date: Sun, 22 Jul 2012 14:45:02 +0200

* lib/am/yacc.am, lib/am/lex.am: Use $(am__ensure_dir_exists) instead
of hand-rolled poor-man equivalent to ensure the directory of the
target exists.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/am/lex.am  |    2 +-
 lib/am/yacc.am |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/am/lex.am b/lib/am/lex.am
index cc443ca..5d039f5 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -23,7 +23,7 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
-       %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
+       %SILENT%$(am__ensure_target_dir_exists)
 ?GENERIC?      %VERBOSE%$(am.lex.maybe-skip) \
 ?!GENERIC??DIST_SOURCE?        %VERBOSE%$(am.lex.maybe-skip) \
        $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index b114f55..b621687 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -41,7 +41,7 @@ endif %?FIRST%
 
 ?GENERIC?%%DERIVED-EXT%: %%EXT%
 ?!GENERIC?%OBJ%: %SOURCE%
-       %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
+       %SILENT%$(am__ensure_target_dir_exists)
        %VERBOSE% \
 ?GENERIC?      $(am.yacc.maybe-skip) \
 ?!GENERIC??DIST_SOURCE?        $(am.yacc.maybe-skip) \
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]