[PATCH util/macros 1/2] Create CHANGELOG/INSTALL_CMD .tmp files in builddir

Emil Velikov emil.l.velikov at gmail.com
Thu Jan 26 17:53:19 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Under normal build rules one should consider srcdir as RO, thus creating
files in srcdir is going to fail.

This was flagged with a recent work in release.sh

Cc: Peter Hutterer <peter.hutterer at who-t.net>
Cc: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 xorg-macros.m4.in | 6 +++---
 xorgversion.m4    | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 2ed7837..675d07d 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1837,9 +1837,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
 AC_DEFUN([XORG_INSTALL], [
 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_builddir)/.INSTALL.tmp && \
+mv \$(top_builddir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_builddir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
 AC_SUBST([INSTALL_CMD])
 ]) # XORG_INSTALL
diff --git a/xorgversion.m4 b/xorgversion.m4
index 19f2ffd..b037cb3 100644
--- a/xorgversion.m4
+++ b/xorgversion.m4
@@ -56,9 +56,9 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
 #
 #
 AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_builddir)/.changelog.tmp && \
+mv \$(top_builddir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_builddir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 AC_SUBST([CHANGELOG_CMD])
 ]) # XORG_CHANGELOG
-- 
2.11.0



More information about the xorg-devel mailing list