add hadrian's config.h to AC_CONFIG_FILES
Needs RevisionPublic

Authored by izgzhen on Aug 17 2017, 12:52 PM.

Details

Summary

Signed-off-by: Zhen Zhang <izgzhen@gmail.com>

Test Plan

clone and build Hadrian

izgzhen created this revision.Aug 17 2017, 12:52 PM
snowleopard accepted this revision.Aug 17 2017, 1:21 PM
This revision is now accepted and ready to land.Aug 17 2017, 1:21 PM
snowleopard requested changes to this revision.Aug 17 2017, 1:36 PM
snowleopard added inline comments.
configure.ac
30

I've noticed this bit: apparently mk/config.h.in is generated by the boot script? If yes, we also need to generate Hadrian's copy (or alternatively keep using the version in mk until The Merge).

This revision now requires changes to proceed.Aug 17 2017, 1:36 PM
izgzhen added inline comments.Aug 17 2017, 8:32 PM
configure.ac
30

But it looks like https://github.com/ghc/ghc/blob/master/mk/config.mk.in is already part of the source tree.

snowleopard added inline comments.Aug 17 2017, 8:43 PM
configure.ac
30

You are pointing to config.mk.in, not config.h.in.

izgzhen added inline comments.Aug 17 2017, 9:02 PM
configure.ac
30

Indeed, my bad. But I can't find which part of boot is responsible for generating mk/config.h.in :(

izgzhen updated this revision to Diff 13571.Aug 19 2017, 10:55 PM

Updating D3869: add hadrian's config.h to AC_CONFIG_FILES

Finally figured out the autoheader magic .... please see the latest revision

Oops, I found that the conditional has zero effect on which line of AC_CONFIG_HEADER will be executed. Looks like only the foremost one will be run. Weird. Don't know how to fix.

I suspects that autoheader will only search for the first AC_CONFIG_HEADER in the configure.ac, disregarding any conditional structure in the that language :(

So does it mean that we can only do this after The Merge? .... if so, then I will simply delete config.h.in file in Hadrian instead.

I suspects that autoheader will only search for the first AC_CONFIG_HEADER in the configure.ac, disregarding any conditional structure in the that language :(

So does it mean that we can only do this after The Merge? .... if so, then I will simply delete config.h.in file in Hadrian instead.

Yes, looks like it. Let's keep using mk/config.h until The Merge then.

configure.ac
30

Yes, the origin of config.h.in is a bit of a mystery. @bgamari Do you know where it comes from?

izgzhen added inline comments.Aug 20 2017, 9:42 PM
configure.ac
30

It comes from AC_CONFIG_HEADER, just that I think this macro will be used by autoheader. But autoheader doesn't understand automake language. The above is my guess.

bgamari requested changes to this revision.Aug 24 2017, 7:25 AM

Yes, let's do this after the merge. Bumping out of the review queue until then.

This revision now requires changes to proceed.Aug 24 2017, 7:25 AM
austin resigned from this revision.Nov 10 2017, 4:03 PM