summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-01-24 17:45:13 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2023-01-24 17:46:57 +0100
commitd173381edcd8054494f26f29bfb237630dfc7724 (patch)
treeaf20df2e344e863954289e214e66f0e8e43ebd49 /lib
parentMerge pull request #12575 from anlancs/fix/build-vtysh-missing-dir (diff)
downloadfrr-d173381edcd8054494f26f29bfb237630dfc7724.tar.xz
frr-d173381edcd8054494f26f29bfb237630dfc7724.zip
build: consistently mkdir -p output for redirect
When running the build in a separate build directory, redirecting output into a file can error out if the directory does not exist yet. Some places already had `mkdir -p` calls, but not all. Make all occurences of this consistently use `@$(MKDIR_P)`. (Extension of PR #12575 to catch more places.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/subdir.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/subdir.am b/lib/subdir.am
index 754a7da63..18e9825a7 100644
--- a/lib/subdir.am
+++ b/lib/subdir.am
@@ -567,6 +567,7 @@ rt_enabled += --enabled zebra
endif
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
+ @$(MKDIR_P) lib
$(PERL) $(top_srcdir)/lib/route_types.pl $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@
DISTCLEANFILES += lib/route_types.h
@@ -581,6 +582,7 @@ PHONY_GITVERSION=lib/gitversion.h.tmp
.SILENT: lib/gitversion.h lib/gitversion.h.tmp
GITH=lib/gitversion.h
lib/gitversion.h.tmp: $(top_srcdir)/.git
+ @$(MKDIR_P) lib
$(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
lib/gitversion.h: lib/gitversion.h.tmp
{ test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}