Pass --foreign to automake when required files (for default GNU behavior) are not...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Sun, 9 Oct 2005 12:00:34 +0000 (12:00 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Sun, 9 Oct 2005 12:00:34 +0000 (12:00 +0000)
eclass/autotools.eclass

index 4c0a314fd07ae17cb4ad428ba25e521bb429a827..49bf89a80aa9ef4b9c388df4dc0a728bbcd495d1 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.23 2005/10/08 16:02:13 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.24 2005/10/09 12:00:34 flameeyes Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 # Enhancements: Martin Schlemmer <azarah@gentoo.org>
@@ -140,9 +140,15 @@ eautoconf() {
 }
 
 eautomake() {
+       local extra_opts
+
        [[ -f Makefile.am ]] || return 0
+
+       [[ -f INSTALL && -f AUTHORS && -f ChangeLog ]] \
+               || extra_opts="${extra_opts} --foreign"
+
        # --force-missing seems not to be recognized by some flavours of automake
-       autotools_run_tool automake --add-missing --copy "$@"
+       autotools_run_tool automake --add-missing --copy ${extra_opts} "$@"
 }