)]}'
{
  "commit": "96a8e5f1c96b1d1d98588e8c5b81a1ac7d482451",
  "tree": "b8a2a88eedece8c1855d4edfba88c56127fce83c",
  "parents": [
    "ca58e3159cfafd616b3495b561b47fd546d1ee77"
  ],
  "author": {
    "name": "Zack Weinberg",
    "email": "zackw@panix.com",
    "time": "Fri Aug 14 13:16:58 2020 -0400"
  },
  "committer": {
    "name": "Zack Weinberg",
    "email": "zackw@panix.com",
    "time": "Fri Aug 14 14:04:46 2020 -0400"
  },
  "message": "Warn if AC_INIT or AC_OUTPUT are missing from configure.ac (#107986)\n\nIt is almost always incorrect for a configure script to omit either\nAC_INIT or AC_OUTPUT.  Issue warnings in the ‘syntax’ category for\nthis.\n\nThe implementation is, unfortunately, a bit of a kludge.  To check for\nthe _absence_ of a macro invocation, we can use m4_provide_if inside a\nm4_wrap hook.  However, if we activate the m4_wrap hook directly from\ngeneral.m4, we get spurious warnings at freeze time.  We also get\nwarnings whenever a script that’s missing AC_INIT and/or AC_OUTPUT\nis *traced*, which means we get double warnings from autoconf, and\nautoheader and aclocal complain about it too, which seems unnecessary.\n\nA clean way to deal with this would be to make the hook look for a\nspecial macro that’s defined only when autoconf (the program) is\ninvoked without any --trace arguments.  Unfortunately, autom4te\ndoesn’t pass --define down to M4, and changing that would involve\ncoordinating with Automake (the project), so instead I’ve gone for the\nkludge: a new file lib/autoconf/trailer.m4 that calls m4_wrap.  This\nfile is *not* included in autoconf.m4f, but it’s installed, and it’s\nadded to the m4 invocation by autoconf (the program) only when not\ntracing.  (It still uses m4_wrap, because we pass it to m4 *before*\nconfigure.ac, because otherwise we get nonsense locations for any\n*other* diagnostics coming out of this autoconf invocation.  I don’t\nknow why.)\n\nThe additional checks in autoreconf are intended to make sure that if\nautoreconf skips a directory entirely, you get told why.\n\nLots of tests in the testsuite didn’t bother with AC_OUTPUT, and\nsomewhat fewer didn’t bother with AC_INIT; where possible I just added\nthem.\n\nSuggested by David A. Wheeler, who submitted a patch, but I didn’t\nwind up using any of his code.  (His implementation used an extra\ntracing pass, only checked for a missing AC_INIT, and invented a new\ncommand-line option to turn off this specific warning.  I thought this\nwas tidier overall, despite the kludge.)\n\n* lib/autoconf/general.m4 (_AC_FINALIZE): New macro: code to be run\n  when generating configure, after the entire configure.ac is\n  processed. Currently only checks that AC_INIT and AC_OUTPUT were\n  called at some point, issuing syntax-category warnings if not.\n  (AC_INIT, AC_OUTPUT): m4_provide self.\n* lib/autoconf/trailer.m4: New file that just calls m4_wrap([_AC_FINALIZE]).\n* lib/local.mk: Install new file.\n\n* bin/autoconf.as: Add trailer.m4 to the final invocation of autom4te,\n  but only when not tracing.\n* bin/autoreconf.in (autoreconf_current_directory): Distinguish in\n  diagnostics between “directory skipped because it doesn’t have a\n  configure.ac or configure.in” (e.g. Cygnus configure) and “directory\n  has a configure.ac but it doesn’t appear to be autoconf input.”\n\n* tests/*.at: Fix all tests affected by the new warnings.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e0cdd069b6fb2f1e92586d5c108c822c38244b97",
      "old_mode": 33188,
      "old_path": "NEWS",
      "new_id": "ccf0f40acaf6d1948f2f72fd3c226e29cd131060",
      "new_mode": 33188,
      "new_path": "NEWS"
    },
    {
      "type": "modify",
      "old_id": "581eb81ebb990da0d7ef5212ea87965c47237a3a",
      "old_mode": 33188,
      "old_path": "bin/autoconf.as",
      "new_id": "ab6e3c52bdb6a4a8121704fbff503a5677f3053f",
      "new_mode": 33188,
      "new_path": "bin/autoconf.as"
    },
    {
      "type": "modify",
      "old_id": "12806d3a760c419cf0947bbdc584392c47fefffa",
      "old_mode": 33188,
      "old_path": "bin/autoreconf.in",
      "new_id": "1ca11f284a0ba02cc92e4b96ce13be2b69769691",
      "new_mode": 33188,
      "new_path": "bin/autoreconf.in"
    },
    {
      "type": "modify",
      "old_id": "4d5f021daa0213e7380cfabd0fe43f12ef68529d",
      "old_mode": 33188,
      "old_path": "lib/autoconf/general.m4",
      "new_id": "81360b784af7ee571e0223afa447635fb628a1d8",
      "new_mode": 33188,
      "new_path": "lib/autoconf/general.m4"
    },
    {
      "type": "modify",
      "old_id": "dd2cb40795709ed2620457c3d7232b14c4cd8c63",
      "old_mode": 33188,
      "old_path": "lib/autoconf/status.m4",
      "new_id": "2d3f92bad6aaf78785e613bdefda18c6543f67b8",
      "new_mode": 33188,
      "new_path": "lib/autoconf/status.m4"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7c14cbfff813580aa93e6d2debd49b08649a93ea",
      "new_mode": 33188,
      "new_path": "lib/autoconf/trailer.m4"
    },
    {
      "type": "modify",
      "old_id": "9612a14c88cae1a4217337eddac1613f8a1f73d8",
      "old_mode": 33188,
      "old_path": "lib/local.mk",
      "new_id": "5cc9d44a3188f6f5d44e6df1cebc8c630d196e53",
      "new_mode": 33188,
      "new_path": "lib/local.mk"
    },
    {
      "type": "modify",
      "old_id": "98125173086c86f8bb16e8c32ad3264d556ea2f2",
      "old_mode": 33188,
      "old_path": "tests/base.at",
      "new_id": "4042a8aa4232d9e7d50fe2a3f3d404eace54dfd0",
      "new_mode": 33188,
      "new_path": "tests/base.at"
    },
    {
      "type": "modify",
      "old_id": "b65d7d44a3f0593b04094332c83c5253fbf7d376",
      "old_mode": 33188,
      "old_path": "tests/c.at",
      "new_id": "b1dabd14acde03944aa280e651a8a869ba0b7df5",
      "new_mode": 33188,
      "new_path": "tests/c.at"
    },
    {
      "type": "modify",
      "old_id": "5d75ada8d9bfa0c1d847e0e8cc69f715fe4f28b2",
      "old_mode": 33188,
      "old_path": "tests/compile.at",
      "new_id": "fbba8e637a4e58c09cd34f3a816dfcaf5a1bf598",
      "new_mode": 33188,
      "new_path": "tests/compile.at"
    },
    {
      "type": "modify",
      "old_id": "a18277ac8ef27277a803469824e5b55b434908c1",
      "old_mode": 33188,
      "old_path": "tests/m4sh.at",
      "new_id": "b352704dcabbddea6243137029e68a6aa48c37fc",
      "new_mode": 33188,
      "new_path": "tests/m4sh.at"
    },
    {
      "type": "modify",
      "old_id": "f10a0b53172e5804408a728e7398848daa6d78e5",
      "old_mode": 33188,
      "old_path": "tests/semantics.at",
      "new_id": "98933aa1a85403047019bf7bc703f11fe3e94ff6",
      "new_mode": 33188,
      "new_path": "tests/semantics.at"
    },
    {
      "type": "modify",
      "old_id": "314462ff431114223179d367f8ac76f68b87701b",
      "old_mode": 33188,
      "old_path": "tests/tools.at",
      "new_id": "3093225c789f40a54d3e5f878ddf81ac6190b1a7",
      "new_mode": 33188,
      "new_path": "tests/tools.at"
    },
    {
      "type": "modify",
      "old_id": "b50dfebc4a2e3eb7bd4dba2ae8d16eed99bd4fce",
      "old_mode": 33188,
      "old_path": "tests/torture.at",
      "new_id": "37deef25bbcffa114e212622f33935db51b777fb",
      "new_mode": 33188,
      "new_path": "tests/torture.at"
    },
    {
      "type": "modify",
      "old_id": "8f77053e840db349187d08be3193bb4abc121272",
      "old_mode": 33188,
      "old_path": "tests/wrapper.as",
      "new_id": "f0a5c037f62db744a8c4867256fb9c23e9d4cf92",
      "new_mode": 33188,
      "new_path": "tests/wrapper.as"
    }
  ]
}
