fix installation with ./ginstall in src
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 22 Sep 2008 20:32:08 +0000 (22:32 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 22 Sep 2008 20:42:20 +0000 (22:42 +0200)
* src/Makefile.am (cu_install_program): New variable, set to
either ./ginstall or @INSTALL_PROGRAM@ (for cross compilation).
(INSTALL_PROGRAM): Override AC_SUBST unconditionally, to avoid
warning, and wrong initialization order.

src/Makefile.am

index 80313ae..3625878 100644 (file)
@@ -466,6 +466,9 @@ sc_tight_scope: $(all_programs)
            exit 1; } || :
 
 # Use the just-built ./ginstall, when not cross-compiling.
-if !CROSS_COMPILING
-INSTALL_PROGRAM = ./ginstall
+if CROSS_COMPILING
+cu_install_program = @INSTALL_PROGRAM@
+else
+cu_install_program = ./ginstall
 endif
+INSTALL_PROGRAM = $(cu_install_program)