Hi,

The revision-install target in Makefile.in attempts to run the
just-built svnversion binary during make install to generate
svn-revision.txt. This violates a basic cross-compilation principle:
target binaries must not be executed on the build host.

This has caused known failures:

- Linux multilib cross-compilation: The 64-bit target binary

happens to run on a 64-bit build host, outputting "Unversioned
directory". The 32-bit target binary fails to run, falling back to
"unknown". The two resulting svn-revision.txt files have different
content, causing an RPM file conflict during image assembly.

Since the source is always a release tarball with no SVN metadata,
svnversion produces no meaningful output regardless. The target
serves no real purpose.

As suggested on-list, the fix is to simply remove the target entirely.

The patch is attached.

Thanks,

Haixiao
[[[
Remove the revision-install target.

* Makefile.in (install): Remove dependency on revision-install.
  (revision-install): Remove target. It serves no purpose when
  installing from a release tarball, and is unreliable in
  cross-compilation environments.
]]]

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 1934955)
+++ Makefile.in	(working copy)
@@ -434,7 +434,7 @@
 clean: local-clean
 distclean: local-distclean
 extraclean: local-extraclean
-install: local-install revision-install
+install: local-install
 
 @INCLUDE_OUTPUTS@
 
@@ -506,14 +506,6 @@
 
 local-install: @INSTALL_RULES@
 
-revision-install:
-	test -d $(DESTDIR)$(includedir)/subversion-1 || \
-	  $(MKDIR) $(DESTDIR)$(includedir)/subversion-1
-	(subversion/svnversion/svnversion $(top_srcdir) 2> /dev/null ||  \
-	 svnversion $(top_srcdir) 2> /dev/null ||                        \
-	 echo "unknown";                                                 \
-	) > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
-
 install-static: @INSTALL_STATIC_RULES@
 
 # JavaHL target aliases

Reply via email to