AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/VEX/pub \
-I$(top_builddir)/VEX/pub \
-DVGA_@VGCONF_ARCH_PRI@=1 \
AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/VEX/pub \
-I$(top_builddir)/VEX/pub \
-DVGA_@VGCONF_ARCH_SEC@=1 \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = valgrind.pc
-BUILT_SOURCES = default.supp vgversion.h valgrind.pc
+BUILT_SOURCES = default.supp include/vgversion.h valgrind.pc
CLEANFILES = default.supp
default.supp: $(DEFAULT_SUPP_FILES)
valgrind.spec \
autogen.sh
-dist-hook: vgversion.h
+dist-hook: include/vgversion.h
cp -p include/vgversion.h $(distdir)/include/vgversion.h
dist_noinst_SCRIPTS = \
vg-in-place
-all-local: default.supp vgversion.h
+all-local: default.supp include/vgversion.h
mkdir -p $(inplacedir)
rm -f $(inplacedir)/default.supp
ln -s ../default.supp $(inplacedir)
pkginclude_HEADERS = config.h
# vgversion.h defines accurate versions to report with -v --version
-vgversion.h:
- $(top_srcdir)/auxprogs/make_or_upd_vgversion_h
+include/vgversion.h:
+ $(top_srcdir)/auxprogs/make_or_upd_vgversion_h $(top_srcdir)
+
+.PHONY: include/vgversion.h
+
fi
}
+srcdir=${1:-.}
+
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 .)"
-#define VEXSVN "$(extract_svn_version VEX)"
+#define VGSVN "$(extract_svn_version $srcdir/.)"
+#define VEXSVN "$(extract_svn_version $srcdir/VEX)"
EOF
if [ -f include/vgversion.h ]
then
# There is already a vgversion.h.
# Update it only if we found a different and real svn version
- if grep unknown include/vgversion.h.tmp ||
+ if grep -q unknown include/vgversion.h.tmp ||
cmp -s include/vgversion.h include/vgversion.h.tmp
then
rm include/vgversion.h.tmp