diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-05-25 09:49:19 (GMT) |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-05-25 09:49:19 (GMT) |
commit | 4dc72467425dbc063c30a871350a896b225ff224 (patch) | |
tree | 12f5534d7db4ac2fa69af002b4fc77fd8ace24ff | |
parent | 430eb4004ab7f93fd840e9836d4bc9220d3c406d (diff) | |
download | libnl-4dc72467425dbc063c30a871350a896b225ff224.zip libnl-4dc72467425dbc063c30a871350a896b225ff224.tar.gz libnl-4dc72467425dbc063c30a871350a896b225ff224.tar.bz2 |
Explicitly create output directories for flex/yacc output.
When out-of-source build with '--disable-dependency-tracking' is
performed, the 'lib/route' and 'lib/route/cls' directories required for
flex/yacc output do not exist. As a result, the flex/yacc calls fail
with ENOENT.
Create the necessary directories explicitly via $(MKDIR_P)
in the flex/yacc rules to guarantee proper out-of-source and in-source
build.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | lib/Makefile.am | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index bbe4e29..879aea5 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,7 @@ AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AM_PROG_LIBTOOL +AC_PROG_MKDIR_P AC_CHECK_PROGS(FLEX, 'flex') AC_CHECK_PROGS(YACC, 'bison -y') diff --git a/lib/Makefile.am b/lib/Makefile.am index b2d142c..1aae6fe 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -47,16 +47,16 @@ CLEANFILES = \ # Hack to avoid using ylwrap. It does not function correctly in combination # with --header-file= route/pktloc_grammar.c: route/pktloc_grammar.l - $(AM_V_GEN) $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^ + $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^ route/pktloc_syntax.c: route/pktloc_syntax.y - $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $^ + $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^ route/cls/ematch_grammar.c: route/cls/ematch_grammar.l - $(AM_V_GEN) $(FLEX) --header-file=route/cls/ematch_grammar.h $(LFLAGS) -o $@ $^ + $(AM_V_GEN) $(MKDIR_P) route/cls; $(FLEX) --header-file=route/cls/ematch_grammar.h $(LFLAGS) -o $@ $^ route/cls/ematch_syntax.c: route/cls/ematch_syntax.y - $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $^ + $(AM_V_GEN) $(MKDIR_P) route/cls; $(YACC) -d $(YFLAGS) -o $@ $^ libnl_route_3_la_LIBADD = libnl-3.la libnl_route_3_la_SOURCES = \ |