• J
    Makefile: avoid infinite loop on configure.ac change · 7f1b6976
    Jeff King 提交于
    If you are using autoconf and change the configure.ac, the
    Makefile will notice that config.status is older than
    configure.ac, and will attempt to rebuild and re-run the
    configure script to pick up your changes. The first step in
    doing so is to run "make configure". Unfortunately, this
    tries to include config.mak.autogen, which depends on
    config.status, which depends on configure.ac; so we must
    rebuild config.status. Which leads to us running "make
    configure", and so on.
    
    It's easy to demonstrate with:
    
      make configure
      ./configure
      touch configure.ac
      make
    
    We can break this cycle by not re-invoking make to build
    "configure", and instead just putting its rules inline into
    our config.status rebuild procedure.  We can avoid a copy by
    factoring the rules into a make variable.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    7f1b6976
Makefile 82.0 KB