diff --git a/configure.ac b/configure.ac index 628e0c8afc..35261aced4 100755 --- a/configure.ac +++ b/configure.ac @@ -860,7 +860,7 @@ fi AC_SUBST([EXTRAVERSION]) if test "$with_pkg_git_version" = "yes"; then - if test -d "${srcdir}/.git"; then + if test -e "${srcdir}/.git"; then AC_DEFINE([GIT_VERSION], [1], [include git version info]) else with_pkg_git_version="no" AC_MSG_WARN([--with-pkg-git-version given, but this is not a git checkout]) diff --git a/tests/subdir.am b/tests/subdir.am index bce08c4034..5efdcbbd4c 100644 --- a/tests/subdir.am +++ b/tests/subdir.am @@ -90,6 +90,7 @@ check_PROGRAMS += \ endif tests/lib/cli/test_commands_defun.c: vtysh/vtysh_cmd.c + mkdir -p tests/lib/cli sed \ -e 's%"vtysh/vtysh\.h"%"tests/helpers/c/tests.h"%' \ -e 's/vtysh_init_cmd/test_init_cmd/' \ @@ -99,6 +100,7 @@ tests/lib/cli/test_commands_defun.c: vtysh/vtysh_cmd.c CLEANFILES += tests/lib/cli/test_commands_defun.c tests/isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz + mkdir -p tests/isisd gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@" CLEANFILES += tests/isisd/test_fuzz_isis_tlv_tests.h diff --git a/yang/embedmodel.py b/yang/embedmodel.py index 52671f99a8..624a11da9d 100644 --- a/yang/embedmodel.py +++ b/yang/embedmodel.py @@ -3,11 +3,18 @@ # YANG module to C wrapper # written 2018 by David Lamparter, placed in Public Domain. -import sys, string, re +import sys +import os +import string +import re inname = sys.argv[1] outname = sys.argv[2] +outdir = os.path.dirname(os.path.abspath(outname)) +if not os.path.isdir(outdir): + os.makedirs(outdir) + # these are regexes to avoid a compile-time/host dependency on yang-tools # or python-yang. Cross-compiling FRR is already somewhat involved, no need # to make it even harder.