build: Define builddir and abs_srcdir when they are missing.

RHEL 5-era autoconf did not define these, so define them manually
when they are missing.

Define builddir as '.'  The scripts require this.  It won't work
in the srcdir != builddir case, but we don't care about that for
RHEL 5.

This commit also moves the builddir / abs_srcdir variable setting
above the include of subdir-rules.mk, in case that include uses
these variables.

Useful script:

  for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do
    if ! grep -q '^abs_srcdir' $f; then
      echo missing in $f
    fi
  done
This commit is contained in:
Richard W.M. Jones
2012-06-17 22:59:46 +01:00
parent dd216fedbd
commit 50aa9533e4
16 changed files with 61 additions and 10 deletions

View File

@@ -15,13 +15,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Old RHEL 5 autoconf doesn't have builddir.
builddir ?= .
include $(top_srcdir)/subdir-rules.mk
java_prefix = com/redhat/et/libguestfs
# Old RHEL 5 autoconf doesn't have builddir.
builddir ?= $(top_builddir)/java
generator_built = \
Makefile.inc \
$(java_built_sources) \