From: Andrea Bolognani Date: Thu, 21 Apr 2016 10:01:27 +0000 (+0200) Subject: build: Fix default network generation on FreeBSD X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=71c22b186ccbb7837213ee516b331d15ba365a62;p=libvirt.git build: Fix default network generation on FreeBSD FreeBSD's sed(1) doesn't support using "\n" to insert a newline, so the installed default.xml file ends up containing a literal "n" between tags; to work around this problem, add a tr(1) invocation as suggested by the sed FAQ[1]. [1] http://sed.sourceforge.net/sedfaq4.html (4.1 c) --- diff --git a/src/Makefile.am b/src/Makefile.am index b71e69485f..09389a82b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3072,8 +3072,9 @@ if WITH_NETWORK $(INSTALL_DATA) $(srcdir)/network/default.xml \ $(DESTDIR)$(confdir)/qemu/networks/default.xml test -z "$(UUID)" || \ - { sed -e "s,,\n $(UUID)," \ - $(DESTDIR)$(confdir)/qemu/networks/default.xml > \ + { sed -e "s,,; $(UUID)," \ + $(DESTDIR)$(confdir)/qemu/networks/default.xml | \ + tr ";" "\n" > \ $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \ cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \ $(DESTDIR)$(confdir)/qemu/networks/default.xml && \