Discussion:
Valgrind: r16398 - in /trunk: Makefile.am auxprogs/make_or_upd_vgversion_h
(too old to reply)
s***@valgrind.org
2017-05-18 08:39:22 UTC
Permalink
Raw Message
Author: mjw
Date: Thu May 18 09:39:21 2017
New Revision: 16398

Log:
Protect vgversion.h in a tarball from getting deleted by make clean

Create a file vgversion_dist.h in the tarball.
This file is not deleted by make clean
Change auxprogs/make_or_upd_vgversion_h to use vgversion_dist.h if it is
available.
Add some missing quotes to auxprogs/make_or_upd_vgversion_h

Patch by Matthias Schwarzott <***@gentoo.org>

Modified:
trunk/Makefile.am
trunk/auxprogs/make_or_upd_vgversion_h

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Thu May 18 09:39:21 2017
@@ -117,7 +117,7 @@
autogen.sh

dist-hook: include/vgversion.h
- cp -p include/vgversion.h $(distdir)/include/vgversion.h
+ cp -p include/vgversion.h $(distdir)/include/vgversion_dist.h

dist_noinst_SCRIPTS = \
vg-in-place

Modified: trunk/auxprogs/make_or_upd_vgversion_h
==============================================================================
--- trunk/auxprogs/make_or_upd_vgversion_h (original)
+++ trunk/auxprogs/make_or_upd_vgversion_h Thu May 18 09:39:21 2017
@@ -14,16 +14,21 @@
fi
}

-srcdir=${1:-.}
+srcdir="${1:-.}"

-cat > include/vgversion.h.tmp <<EOF
+if [ -e "$srcdir"/include/vgversion_dist.h ]
+then
+ cp "$srcdir"/include/vgversion_dist.h include/vgversion.h.tmp
+else
+ cat > include/vgversion.h.tmp <<EOF
/* Do not edit: file generated by auxprogs/make_or_upd_vgversion_h.
This file defines VGSVN and VEXSVN, used to report SVN revision
when using command line options: -v --version
*/
-#define VGSVN "$(extract_svn_version $srcdir/.)"
-#define VEXSVN "$(extract_svn_version $srcdir/VEX)"
+#define VGSVN "$(extract_svn_version "$srcdir/.")"
+#define VEXSVN "$(extract_svn_version "$srcdir/VEX")"
EOF
+fi

if [ -f include/vgversion.h ]
then

Loading...